Problem

1 /12


What is a matrix? Creation, display

Theory Click to read/hide

Error

Problem

Fill a binary matrix (consisting of only zeros and ones) in a checkerboard pattern. There should be a null element in the top left corner.

Input
The input line contains space-separated dimensions of the matrix: the number of rows N and the number of columns M  (\( 1 <= N , M <= 100 \)).

Imprint
The program should output the binary matrix row by row.
 

Examples
# Input Output
1 4 5 0 1 0 1 0
1 0 1 0 1
0 1 0 1 0
1 0 1 0 1