Subset Generator

You are given a set consisting of numbers 1, 2, ..., n-1, n. Your task is to output all the subsets of the given set, with each subset printed on a separate line. The order of the subsets in the output does not matter.

Input

The input consists of a single integer n (1 ≀ n ≀ 15), representing the number of elements in the set.

Output

The program should print all the subsets of the given set, with each subset printed on a separate line. Each subset should be represented as a space-separated sequence of numbers. The order of the subsets does not matter.

Examples

Input
Output
1
1
2
1 2 1 2
3
1 1 2 1 2 3 1 3 2 2 3 3

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue