import java.util.Scanner;

public class TicTacToe_000 {
    public static void main(String[] arg) {
        int[][] board = {{-1,-1,-1},
                          {-1,-1,-1},
                          {-1,-1,-1}};

        Scanner in = new Scanner(System.in);

        int row = 0;
        int col = 0;

        row = in.nextInt();
        col = in.nextInt();

        board[row][col] = 0;  // 0 = X

        //System.out.println("board[" + row +"]" + "[" + col + "] = "  + board[row][col]);
        //System.out.println();

        printArray(board);
    }

    public static void printArray(int[][] a) {
        for (int row = 0; row < 3; row++) {
            for (int col = 0; col < 3; col++) {
                // BLANK_0
            }
            System.out.println();
        }
    }
}