Subsets generation#4106

Subsets generation

1 second
128 megabytes
Very easy

Given a set of size , containing all elements from the interval , generate all of its subsets.

Input

One positive integer n~(1 \le n \le 8).

Output

Each subset of the set \{1, ..., n\} should be printed on a separate line. The subset should be printed as a list of its elements in ascending order. The elements of the subset must be written without spaces, i.e., as a concatenated string. Each subset should appear no more than once. The subsets should be listed in ascending order. The empty subset should not be printed.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading