import java.util.Scanner;

public class TicTacToe_001 {
    public static void main(String[] arg) {
        char[][] board = {{'#','#','#'},
                          {'#','#','#'},
                          {'#','#','#'}};

        Scanner in = new Scanner(System.in);

        int row = 0;
        int col = 0;

        boolean turn = true; // true = x, false = o,

        while(true) {
            row = in.nextInt();
            col = in.nextInt();

            board[row][col] = (turn ? 'x' : 'o');
            turn = !turn;

            printArray(board);
        }
    }

    public static void printArray(char[][] a) {
        for (int row = 0; row < 3; row++) {
            for (int col = 0; col < 3; col++) {
                System.out.print(a[row][col] + " ");  // BLANK_0
            }
            System.out.println();
        }
    }
}