Fill the grid

Given a 2n×2n2^n \times 2^n grid, you are asked to fill it with L-shaped trominos except for a single cell (r, c). That one cell needs to be empty.

An L-shaped tromino is a figure obtained by removing a single cell from a 2×22 \times 2 square.

In case it’s not possible to fill the grid, the program should print Impossible.

1200px-Trominoes.svg.png
L-shaped tromino

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 9).

The second line contains the coordinates of the empty cell (r, c) (1 ≤ r, c ≤ 2n2^n) where r is the row of the empty cell and c is the column.

Output

The program should print 2n2^n rows that contain 2n2^n numbers separated by a space. Each number should represent a single L-shaped tromino. The removed cell should be marked with a 0. The trominos should be indexed from 1 to (22n−1)/3(2^{2n} - 1) / 3. In case there are many solutions, the program can output any of those.

Examples

Input

Output

2
1 1

0 1 3 3
1 1 4 3
2 4 4 5
2 2 5 5

Constraints

Time limit: 1.6 seconds

Memory limit: 512 MB

Output limit: 10 MB