#P2002. ACSL 2015-2016 Junior Division Contest #3 ACSL ABC
ACSL 2015-2016 Junior Division Contest #3 ACSL ABC
Easy as ABC is a puzzle game by Wei-Hwa Huang. In the puzzle the letters A, B and C are placed in the grid so that each letter appears just once in each row and column. In addition some letters will be placed in the puzzle at the start of the game. The game is played on a 3 x 3 grid.

INPUT FORMAT
There will be 5 lines of input. Each line will contain the number of letters in the grid at the start of the game followed by their location (see Grid #1) and the letter at that location. The data for Grid #2 is Sample Data #1.
OUPUT FORMAT
For each input line print the resulting grid with the letters in the correct positions. The letters must be printed on one line in grid number order 1 – 9.
SAMPLE
INPUT
3, 1, A, 3, C, 8, A
3, 1, A, 6, C, 8, B
3, 1, B, 6, B, 9, C
2, 1, C, 5, B
2, 3, B, 7, A
OUTPUT
ABCBCACAB
ACBBACCBA
BCACABABC
CABABCBCA
CABBCAABC