Problem F: Checkerboard overlay

Problem F: Checkerboard overlay

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 18  Solved: 10
[Submit] [Status] [Web Board] [Creator:]

Description

English:
In a chessboard composed of 2k x 2k (ie: 2 ^ kx 2 ^ k) squares, there is exactly one square that is different from the other squares, and the square is called a special square, and the square is called one Special chess board. In the board covering problem, all four squares except the special squares on a given special board should be covered with the four different types of L-shaped dominoes shown, and any two L-shaped dominoes must not overlap.


Chinese:
在一个2k x 2k ( 即:2^k x 2^k )个方格组成的棋盘中,恰有一个方格与其他方格不同,称该方格为一特殊方格,且称该棋盘为一特殊棋盘。在棋盘覆盖问题中,要用图示的4种不同形态的L型骨牌覆盖给定的特殊棋盘上除特殊方格以外的所有方格,且任何2个L型骨牌不得重叠覆盖。

Input

The first line of the input file is the integer k, (the size of the board is 2k*21 <= k <= 10), and the second line is two integers, which represent the row number and column number of the special grid.

输入文件第一行为整数k,(棋盘大小是2k*2k 1<=k<=10),第二行是两个整数,代表特殊方格所在行号和列号。

Output

The special points are output with 0, and the data are separated by tabs (‘t’). The traversal order is required to be from left to right and from top to bottom. See specific examples


特殊点用0输出,数据间用制表符隔开(‘t’), 要求遍历顺序按从左到右,从上到下。具体看样例

Sample Input Copy

3
2 2

Sample Output Copy

3	3	4	4	8	8	9	9	
3	0	2	4	8	7	7	9	
5	2	2	6	10	10	7	11	
5	5	6	6	1	10	11	11	
13	13	14	1	1	18	19	19	
13	12	14	14	18	18	17	19	
15	12	12	16	20	17	17	21	
15	15	16	16	20	20	21	21