100.0% (42/42)

63.4% (59/93)

# Description

Given two sets $S_A$ and $S_B$. If all elements in set $S_B$ are also in set $S_A$, we say that $S_B$ is a subset of $S_A$.
For example, if set $S_A=\{A,B,C,D\}$, $\{A,C\}$, $\{A\}$, $\{B,C,D\}$ are all subsets of set $S_A$.
Now please write a program that prints all subsets of given set $S_A$.

# Input Format

Input contains two lines. First line of input is an integer $n$, representing the number of elements in the set $S_A$. $(1 \leq n \leq 16)$
The second line of input contains $n$ characters (letters and digits only), which are elements of the set $S_A$.

# Output Format

All subsets (except for empty set) of given set $S_A$ with each subset in a line. No blank spaces are required.
You don't need to concern about the order of subsets or elements in a subset.

3
A B C

ABC
AB
AC
BC
A
B
C