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;
vector<vector<char> > a, b;
long long n, m, res = 1e9;
void init(vector<vector<char> > &a) {
  a.assign(n + 1, vector<char>());
  for (long long i = 1; i <= n; i++) a[i].assign(m + 1, char());
}
void solve(char A, char B, char C, char D, bool opt) {
  long long ans = 0;
  vector<vector<char> > tmp;
  init(tmp);
  if (!opt) {
    for (long long i = 1; i <= n; i++) {
      if (i % 2 == 1) {
        long long tmp1 = 0, tmp2 = 0;
        for (long long j = 1; j <= m; j++) {
          if (j % 2 == 1 and a[i][j] != A) tmp1++;
          if (j % 2 == 0 and a[i][j] != B) tmp1++;
        }
        for (long long j = 1; j <= m; j++) {
          if (j % 2 == 1 and a[i][j] != B) tmp2++;
          if (j % 2 == 0 and a[i][j] != A) tmp2++;
        }
        if (tmp1 < tmp2) {
          ans += tmp1;
          for (long long j = 1; j <= m; j++) tmp[i][j] = (j % 2 == 1 ? A : B);
        } else {
          ans += tmp2;
          for (long long j = 1; j <= m; j++) tmp[i][j] = (j % 2 == 1 ? B : A);
        }
      } else {
        long long tmp1 = 0, tmp2 = 0;
        for (long long j = 1; j <= m; j++) {
          if (j % 2 == 1 and a[i][j] != C) tmp1++;
          if (j % 2 == 0 and a[i][j] != D) tmp1++;
        }
        for (long long j = 1; j <= m; j++) {
          if (j % 2 == 1 and a[i][j] != D) tmp2++;
          if (j % 2 == 0 and a[i][j] != C) tmp2++;
        }
        if (tmp1 < tmp2) {
          ans += tmp1;
          for (long long j = 1; j <= m; j++) tmp[i][j] = (j % 2 == 1 ? C : D);
        } else {
          ans += tmp2;
          for (long long j = 1; j <= m; j++) tmp[i][j] = (j % 2 == 1 ? D : C);
        }
      }
    }
  } else {
    for (long long i = 1; i <= m; i++) {
      if (i % 2 == 1) {
        long long tmp1 = 0, tmp2 = 0;
        for (long long j = 1; j <= n; j++) {
          if (j % 2 == 1 and a[j][i] != A) tmp1++;
          if (j % 2 == 0 and a[j][i] != B) tmp1++;
        }
        for (long long j = 1; j <= n; j++) {
          if (j % 2 == 1 and a[j][i] != B) tmp2++;
          if (j % 2 == 0 and a[j][i] != A) tmp2++;
        }
        if (tmp1 < tmp2) {
          ans += tmp1;
          for (long long j = 1; j <= n; j++) tmp[j][i] = (j % 2 == 1 ? A : B);
        } else {
          ans += tmp2;
          for (long long j = 1; j <= n; j++) tmp[j][i] = (j % 2 == 1 ? B : A);
        }
      } else {
        long long tmp1 = 0, tmp2 = 0;
        for (long long j = 1; j <= n; j++) {
          if (j % 2 == 1 and a[j][i] != C) tmp1++;
          if (j % 2 == 0 and a[j][i] != D) tmp1++;
        }
        for (long long j = 1; j <= n; j++) {
          if (j % 2 == 1 and a[j][i] != D) tmp2++;
          if (j % 2 == 0 and a[j][i] != C) tmp2++;
        }
        if (tmp1 < tmp2) {
          ans += tmp1;
          for (long long j = 1; j <= n; j++) tmp[j][i] = (j % 2 == 1 ? C : D);
        } else {
          ans += tmp2;
          for (long long j = 1; j <= n; j++) tmp[j][i] = (j % 2 == 1 ? D : C);
        }
      }
    }
  }
  if (res > ans) {
    res = ans;
    b = tmp;
  }
}
signed main() {
  cin >> n >> m;
  init(a);
  init(b);
  for (long long i = 1; i <= n; i++) {
    string s;
    cin >> s;
    for (long long j = 1; j <= m; j++) a[i][j] = s[j - 1];
  }
  char c[4] = {'A', 'T', 'G', 'C'};
  for (long long i = 1; i <= (1 << 4); i++) {
    if (__builtin_popcount(i) != 2) continue;
    vector<char> up, dwn;
    for (long long j = 0; j < 4; j++) {
      if (i & (1 << j))
        up.push_back(c[j]);
      else
        dwn.push_back(c[j]);
    }
    solve(up[0], up[1], dwn[0], dwn[1], 0);
    solve(up[0], up[1], dwn[0], dwn[1], 1);
  }
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= m; j++) cout << b[i][j];
    cout << '\n';
  }
}
