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;
using LL = long long;
using PII = pair<int, int>;
const int N = 3e5 + 10;
char S[] = "AGCT";
string s[N];
int pos[N], tpos[N];
int a[4], ta[4];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> s[i];
  int ans = INT_MAX, flag = -1;
  for (int i = 0; i < 4; i++)
    for (int j = i + 1; j < 4; j++)
      for (int k = 0; k < 4; k++)
        if (k != i && k != j) {
          int p = 6 - (i + j + k);
          a[0] = i;
          a[1] = j;
          a[2] = k;
          a[3] = p;
          int tmp = 0;
          for (int i = 0; i < n; i++) {
            int t1 = 0, t2 = 0;
            for (int j = 0; j < m; j++) {
              int k = ((i & 1) << 1) + (j & 1);
              if (s[i][j] != S[a[k]]) t1++;
              k = ((i & 1) << 1) + (1 - (j & 1));
              if (s[i][j] != S[a[k]]) t2++;
            }
            if (t1 < t2)
              pos[i] = 0;
            else
              pos[i] = 1;
            tmp += min(t1, t2);
          }
          if (tmp < ans) {
            ans = tmp;
            flag = 1;
            memcpy(ta, a, sizeof(a));
            memcpy(tpos, pos, sizeof(pos));
          }
        }
  for (int i = 0; i < 4; i++)
    for (int j = i + 1; j < 4; j++)
      for (int k = 0; k < 4; k++)
        if (k != i && k != j) {
          int p = 6 - (i + j + k);
          a[0] = i;
          a[1] = j;
          a[2] = k;
          a[3] = p;
          int tmp = 0;
          for (int i = 0; i < m; i++) {
            int t1 = 0, t2 = 0;
            for (int j = 0; j < n; j++) {
              int k = ((i & 1) << 1) + (j & 1);
              if (s[j][i] != S[a[k]]) t1++;
              k = ((i & 1) << 1) + (1 - (j & 1));
              if (s[j][i] != S[a[k]]) t2++;
            }
            if (t1 < t2)
              pos[i] = 0;
            else
              pos[i] = 1;
            tmp += min(t1, t2);
          }
          if (tmp < ans) {
            ans = tmp;
            flag = 2;
            memcpy(ta, a, sizeof(a));
            memcpy(tpos, pos, sizeof(pos));
          }
        }
  memcpy(a, ta, sizeof(a));
  memcpy(pos, tpos, sizeof(pos));
  if (flag == 1) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        int k;
        if (pos[i] == 0)
          k = ((i & 1) << 1) + (j & 1);
        else
          k = ((i & 1) << 1) + (1 - (j & 1));
        s[i][j] = S[a[k]];
      }
    }
  } else {
    for (int i = 0; i < m; i++) {
      for (int j = 0; j < n; j++) {
        int k;
        if (pos[i] == 0)
          k = ((i & 1) << 1) + (j & 1);
        else
          k = ((i & 1) << 1) + (1 - (j & 1));
        s[j][i] = S[a[k]];
      }
    }
  }
  for (int i = 0; i < n; i++) cout << s[i] << '\n';
  return 0;
}
