Gift for Anton#11815

Gift for Anton

0.5 seconds
256 megabytes
Hard

Anton wants to receive as a gift a rectangular table of size n\times m filled with the numbers , , , , or .

Anton will be happy if there is no other next to each , exactly one other next to each , exactly two other s next to each , exactly three other s next to each , and exactly four other s next to each (i.e., all neighbors of must also be ).

One cell is considered to be next to another if they share a side.

You need to come up with a table that can be gifted to Anton so that he will be happy.

Below is an example of a table that will make Anton happy with n=4, m=6.

Input

A single line contains two numbers (1 \leq n, m \leq 200) — the dimensions of the table.

It can be shown that a solution always exists.

Output

Output a table with rows and columns — a gift for Anton.

Examples

Example 1

Loading
Loading

Scoring

  1. ( points): n = 1;

  2. ( points): n = 2;

  3. ( points): n = 3;

  4. ( points): n = m = 4;

  5. ( points): n = m = 30;

  6. ( points): n = 30, m = 31;

  7. ( points): n = 30, m = 32;

  8. ( points): n = m = 31;

  9. ( points): n = 31, m = 32;

  10. ( points): n = m = 32;

  11. ( points): no additional restrictions.