CSES - Aalto Competitive Programming 2024 - wk12 - Wed - Even Grid
  • Time limit: 1.00 s
  • Memory limit: 512 MB

You are given an n×nn \times n binary matrix where all of the values are missing except for the top & left edges. It is also guaranteed that the top left corner is a 1. Your task is to fill the missing values so that each column and each row has an even number of ones.

Input

The first line contains one integer: nn
The following nn lines contain a string of length nn.

Output

Print any valid way to fill the matrix. It is guaranteed that a solution always exists.

Constraints

  • 2n1002 \leq n \leq 100
  • The characters in the matrix are either 0, 1, or ?

Example

Input:

5
11000
0????
0????
0????
1????

Output:

11000
00000
01100
00101
10001