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;
const long long N = 300100, mod = 1e9 + 7, mod2 = 1e9 + 9, mod3 = 998244353,
                sq = 450, base = 727, lg = 30;
long long n, m, x, y, z, w, k, ans = 1e10, t;
string s[N], f[N];
string ans1, ans2;
long long sat(long long xx, char f0, char f1) {
  long long yy = 0, zz = 0;
  for (int i = 0; i < m; i++) {
    if (i % 2 && s[xx][i] != f1) yy++;
    if (!(i % 2) && s[xx][i] != f0) yy++;
  }
  for (int i = 0; i < m; i++) {
    if (i % 2 && s[xx][i] != f0) zz++;
    if (!(i % 2) && s[xx][i] != f1) zz++;
  }
  return min(yy, zz);
}
long long sot(long long xx, char f0, char f1) {
  long long yy = 0, zz = 0;
  for (int i = 0; i < n; i++) {
    if (i % 2 && s[i][xx] != f1) yy++;
    if (!(i % 2) && s[i][xx] != f0) yy++;
  }
  for (int i = 0; i < n; i++) {
    if (i % 2 && s[i][xx] != f0) zz++;
    if (!(i % 2) && s[i][xx] != f1) zz++;
  }
  return min(yy, zz);
}
void solve(string f, long long r) {
  long long xx = 0;
  if (r == 0)
    for (int i = 0; i < n; i++)
      xx += (!(i % 2) ? sat(i, f[0], f[1]) : sat(i, f[2], f[3]));
  else
    for (int i = 0; i < m; i++)
      xx += (!(i % 2) ? sot(i, f[0], f[1]) : sot(i, f[2], f[3]));
  if (xx < ans) {
    ans = xx;
    ans1 = f[0];
    ans1 += f[1];
    ans2 = f[2];
    ans2 += f[3];
    t = r;
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    f[i] = s[i];
  }
  solve("AGCT", 0);
  solve("ACGT", 0);
  solve("ATCG", 0);
  solve("CTAG", 0);
  solve("GTAC", 0);
  solve("CGAT", 0);
  solve("AGCT", 1);
  solve("ACGT", 1);
  solve("ATCG", 1);
  solve("CTAG", 1);
  solve("GTAC", 1);
  solve("CGAT", 1);
  if (t == 0) {
    for (int i = 0; i < n; i++) {
      long long xx = 0, zz = 0;
      for (int j = 0; j < m; j++) {
        if ((j % 2 && s[i][j] != (i % 2 ? ans2[1] : ans1[1])) ||
            (j % 2 == 0 && s[i][j] != (i % 2 ? ans2[0] : ans1[0])))
          xx++;
      }
      for (int j = 0; j < m; j++) {
        if ((j % 2 && s[i][j] != (i % 2 ? ans2[0] : ans1[0])) ||
            (j % 2 == 0 && s[i][j] != (i % 2 ? ans2[1] : ans1[1])))
          zz++;
      }
      w = 0;
      if (zz < xx) w = 1;
      for (int j = 0; j < m; j++)
        cout << (i % 2 ? ans2[(w + j % 2) % 2] : ans1[(w + j % 2) % 2]);
      cout << endl;
    }
  } else {
    for (int i = 0; i < m; i++) {
      long long xx = 0, zz = 0;
      for (int j = 0; j < n; j++) {
        if ((j % 2 && s[j][i] != (i % 2 ? ans2[1] : ans1[1])) ||
            (j % 2 == 0 && s[j][i] != (i % 2 ? ans2[0] : ans1[0])))
          xx++;
      }
      for (int j = 0; j < n; j++) {
        if ((j % 2 && s[j][i] != (i % 2 ? ans2[0] : ans1[0])) ||
            (j % 2 == 0 && s[j][i] != (i % 2 ? ans2[1] : ans1[1])))
          zz++;
      }
      w = 0;
      if (zz < xx) w = 1;
      for (int j = 0; j < n; j++)
        f[j][i] = (i % 2 ? ans2[(w + j % 2) % 2] : ans1[(w + j % 2) % 2]);
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) cout << f[i][j];
      cout << endl;
    }
  }
  return 0;
}
