eolymp
bolt
Try our new interface for solving problems
Problems

Without two consecutive ones

Without two consecutive ones

Given positive integer n, print all binary sequences of length n without consecutive ones, in lexicographical order.

Input

One positive integer n (n20).

Output

Print each sequence in a separate line. Digits in a sequence must be separated with a space.

Time limit 1 second
Memory limit 128 MiB
Input example #1
3
Output example #1
0 0 0
0 0 1
0 1 0
1 0 0
1 0 1