Лимит времени 10000/10000/10000/10000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Problem description
Make a program that generates all the subsets of a strings set S. Concatenate the members of each subset and print them lexicographic order.
Input
The first line of the input contains an integer N (1<= N <= 20) representing size of the S. Each of the following N lines contain a string (at most 20 letters) consists of English lowercase letters.
Output
Each of the output contains a concatenated subset of S in lexicographic order.
Example
| stdin |
stdout |
|
3
bba
a
abc |
a
aabc
aabcbba
abba
abc
abcbba
bba |
4
ab
aab
a
b |
a
aaab
aaabab
aaababb
aaabb
aab
aabab
aababb
aabb
ab
abb
b |
Для отправки решений необходимо выполнить вход.
|