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.
#include <bits/stdc++.h>
using namespace std;
inline int mul(int a, int b) { return int(a * 1ll * b % 998244353); }
inline int norm(int a) {
  if (a >= 998244353) a -= 998244353;
  if (a < 0) a += 998244353;
  return a;
}
inline int binPow(int a, int k) {
  int ans = 1;
  while (k > 0) {
    if (k & 1) ans = mul(ans, a);
    a = mul(a, a);
    k >>= 1;
  }
  return ans;
}
inline int subtract(int a, int b) { return norm(a - b); }
inline int sum(int a, int b) { return int((a + b) % 998244353); }
inline int inv(int a) { return binPow(a, 998244353 - 2); }
int main() {
  int n, m;
  cin >> n >> m;
  vector<string> table(n);
  for (int i = 0; i < n; i++) {
    cin >> table[i];
  }
  string temp = "AGCT";
  int all = 15;
  vector<vector<char>> ans(n, vector<char>(m));
  vector<vector<char>> curr_ans(n, vector<char>(m));
  int min_dif = 3000000;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < i; j++) {
      int first_sym = i;
      int second_sym = j;
      int third_sym = 0;
      int fourth_sym = 0;
      while (third_sym == first_sym || third_sym == second_sym) third_sym++;
      while (fourth_sym == third_sym || fourth_sym == second_sym ||
             fourth_sym == first_sym)
        fourth_sym++;
      int curr_dif = 0;
      for (int t = 0; t < n; t++) {
        swap(first_sym, third_sym);
        swap(second_sym, fourth_sym);
        int transpos = 0;
        int dif1 = 0, dif2 = 0;
        for (int q = 0; q < m; q++) {
          if (!(q % 2) && table[t][q] != temp[first_sym]) {
            dif1++;
          }
          if ((q % 2) && table[t][q] != temp[second_sym]) {
            dif1++;
          }
          if ((q % 2) && table[t][q] != temp[first_sym]) {
            dif2++;
          }
          if (!(q % 2) && table[t][q] != temp[second_sym]) {
            dif2++;
          }
        }
        if (dif2 < dif1) {
          swap(dif2, dif1);
          transpos = 1;
        }
        curr_dif += dif1;
        for (int q = 0; q < m; q++) {
          if ((q % 2) == transpos) curr_ans[t][q] = temp[first_sym];
          if ((q % 2) != transpos) curr_ans[t][q] = temp[second_sym];
        }
      }
      if (curr_dif < min_dif) {
        min_dif = curr_dif;
        for (int t = 0; t < n; t++) {
          for (int q = 0; q < m; q++) {
            ans[t][q] = curr_ans[t][q];
          }
        }
      }
      curr_dif = 0;
      for (int t = 0; t < m; t++) {
        swap(first_sym, third_sym);
        swap(second_sym, fourth_sym);
        int transpos = 0;
        int dif1 = 0, dif2 = 0;
        for (int q = 0; q < n; q++) {
          if (!(q % 2) && table[q][t] != temp[first_sym]) {
            dif1++;
          }
          if ((q % 2) && table[q][t] != temp[second_sym]) {
            dif1++;
          }
          if ((q % 2) && table[q][t] != temp[first_sym]) {
            dif2++;
          }
          if (!(q % 2) && table[q][t] != temp[second_sym]) {
            dif2++;
          }
        }
        if (dif2 < dif1) {
          swap(dif2, dif1);
          transpos = 1;
        }
        curr_dif += dif1;
        for (int q = 0; q < n; q++) {
          if ((q % 2) == transpos) curr_ans[q][t] = temp[first_sym];
          if ((q % 2) != transpos) curr_ans[q][t] = temp[second_sym];
        }
      }
      if (curr_dif < min_dif) {
        min_dif = curr_dif;
        for (int t = 0; t < n; t++) {
          for (int q = 0; q < m; q++) {
            ans[t][q] = curr_ans[t][q];
          }
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << ans[i][j];
    }
    cout << endl;
  }
  return 0;
}
