12527 - Power Set   

Description

In mathematics, the power set (or powerset) of any set S is the set of all subsets of S, including the empty set and S itself

Take the set S1 = {'1','2'} for example:

the power set of S1 is {{},{'1'},{'2'},{'1','2'}}

00 -> empty set, 01 -> {'1'}, 10 -> {'2'} , 11 -> {'1','2'} (00,01,10,11 is the binary representation of power set's index)

Take the set S2 = {'1','2','3'} for example:

the power set of S2 is {{},{'1'},{'2'},{'1','2'},{'3'},{'1','3'},{'2','3'},{'1','2','3'}}

In this problem, you are asked to generate power set by given a aspecific set.

Input

S

S: the input string can be viewed as a set ( 4 <= S <= 21)

Output

Output the element of power set (followed by a newline character at the end of each output element) 

Sample Input  Download

Sample Output  Download

Tags




Discuss