#K89012. Alternating Binary Pattern

    ID: 37436 Type: Default 1000ms 256MiB

Alternating Binary Pattern

Alternating Binary Pattern

You are given a positive integer ( N ). Your task is to print an alternating pattern of binary digits over ( N ) lines. The pattern for the first line is simply '1'. For each subsequent line, append the next digit in an alternating sequence starting with '1'. For example, for ( N = 3 ), the output should be:

1 10 101

Make sure to print each pattern on a new line.

inputFormat

A single integer ( N ) representing the number of lines for the pattern. The input is provided via standard input (stdin).

outputFormat

Print ( N ) lines where the ( i^{th} ) line contains an alternating pattern of binary digits starting with '1' for ( i ) characters. The output should be printed to standard output (stdout).## sample

3
1

10 101

</p>