You are given an n × m table, consisting of characters «A», «G», «C», «T». Let's call a table nice, if every 2 × 2 square contains all four distinct characters. Your task is to find a nice table (also consisting of «A», «G», «C», «T»), that differs from the given table in the minimum number of characters.

Input

First line contains two positive integers n and m — number of rows and columns in the table you are given (2 ≤ n, m, n × m ≤ 300 000). Then, n lines describing the table follow. Each line contains exactly m characters «A», «G», «C», «T».

Output

Output n lines, m characters each. This table must be nice and differ from the input table in the minimum number of characters.

Examples

Input


2 2
AG
CT


Output


AG
CT


Input


3 5
AGCAG
AGCAG
AGCAG


Output


TGCAT
CATGC
TGCAT

Note

In the first sample, the table is already nice. In the second sample, you can change 9 elements to make the table nice.
import java.io.*;
import java.util.*;

public class NiceTable {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        String[] params = br.readLine().split(" ");
        int n = Integer.parseInt(params[0]);
        int m = Integer.parseInt(params[1]);
        boolean flip = false;
        if (n > m) {
            flip = true;
        }
        char[][] table = new char[Math.min(n, m)][Math.max(n, m)];
        for (int i = 0; i < n; i++) {
            char[] chars = br.readLine().toCharArray();
            for (int j = 0; j < m; j++) {
                if (flip) {
                    table[j][i] = chars[j];
                } else {
                    table[i][j] = chars[j];
                }
            }
        }
        char[] chars = {'A', 'C', 'G', 'T'};
        char[][] bestTable = new char[2][table[0].length];
        int bestDir = 0;
        int minChange = Integer.MAX_VALUE;
        for (int i = 0; i < 4; i++) {
            for (int j = i + 1; j < 4; j++) {
                List<Character> evenChars = new ArrayList<>();
                for (int k = 0; k < 4; k++) {
                    if (k != i && k != j) {
                        evenChars.add(chars[k]);
                    }
                }
                for (int dir = 0; dir < 2; dir++) {
                    int curChange = 0;
                    char[][] curTable;
                    curTable = new char[2][table[0].length];
                    //chars[i] & chars[j] go in even spots

                    for (int k = 0; k < (dir == 0 ? table[0].length : table.length); k++) {
                        char[] toUse = new char[2];
                        if (k % 2 == 0) {
                            toUse[0] = chars[i];
                            toUse[1] = chars[j];
                        } else {
                            toUse[0] = evenChars.get(0);
                            toUse[1] = evenChars.get(1);
                        }
                        int diff1 = 0;
                        int diff2 = 0;
                        for (int l = 0; l < (dir == 0 ? table.length : table[0].length); l++) {
                            if (dir == 0) {
                                if (table[l][k] != toUse[l % 2]) {
                                    diff1++;
                                }
                                if (table[l][k] != toUse[1 - (l % 2)]) {
                                    diff2++;
                                }
                            } else {
                                if (table[k][l] != toUse[l % 2]) {
                                    diff1++;
                                }
                                if (table[k][l] != toUse[1 - (l % 2)]) {
                                    diff2++;
                                }

                            }
                        }
                        curChange += Math.min(diff1, diff2);
                        if (diff1 <= diff2) {
                            curTable[0][k] = toUse[0];
                            curTable[1][k] = toUse[1];
                        } else {
                            curTable[0][k] = toUse[1];
                            curTable[1][k] = toUse[0];
                        }
                    }
                    if (curChange < minChange) {
                        bestDir = dir;
                        minChange = curChange;
                        bestTable = curTable;
                    }
                }
            }
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                if (flip ^ (bestDir == 1)) {
                    pw.print(bestTable[j % 2][i]);
                } else {
                    pw.print(bestTable[i % 2][j]);
                }
            }
            pw.println();
        }
        pw.flush();
        br.close();
        pw.close();
    }

}
