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>
const int N = 3e5 + 1;
using namespace std;
vector<char> dime[N], ans1[N];
string s[] = {"ATGC", "AGCT", "CAGT", "GCAT", "CTAG", "GTCA"};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string t;
  int n, m, i, j, l, ans = N, type = -1, now, sum1, sum0;
  bool iscac = true;
  cin >> n >> m;
  char x;
  for (i = 1; i <= n; i++) {
    dime[i].push_back('?');
    ans1[i].push_back('?');
    for (j = 1; j <= m; j++) {
      cin >> x;
      dime[i].push_back(x);
    }
  }
  for (i = n + 1; i <= m; i++) {
    ans1[i].push_back('?');
  }
  for (l = 0; l < 6; l++) {
    t = s[l];
    now = 0;
    for (i = 1; i <= n; i++) {
      sum0 = 0;
      sum1 = 0;
      for (j = 1; j <= m; j++) {
        if (dime[i][j] != t[(j + 1) % 2 + (i % 2) * 2]) {
          sum0++;
        }
        if (dime[i][j] != t[j % 2 + (i % 2) * 2]) {
          sum1++;
        }
      }
      now += min(sum0, sum1);
    }
    if (now < ans) {
      ans = now;
      iscac = false;
      type = l;
    }
    now = 0;
    for (i = 1; i <= m; i++) {
      sum0 = 0;
      sum1 = 0;
      for (j = 1; j <= n; j++) {
        if (dime[j][i] != t[(j + 1) % 2 + (i % 2) * 2]) {
          sum0++;
        }
        if (dime[j][i] != t[j % 2 + (i % 2) * 2]) {
          sum1++;
        }
      }
      now += min(sum0, sum1);
    }
    if (now < ans) {
      ans = now;
      iscac = true;
      type = l;
    }
  }
  t = s[type];
  if (!iscac) {
    for (i = 1; i <= n; i++) {
      sum0 = 0;
      sum1 = 0;
      for (j = 1; j <= m; j++) {
        if (dime[i][j] != t[(j + 1) % 2 + (i % 2) * 2]) {
          sum0++;
        }
        if (dime[i][j] != t[j % 2 + (i % 2) * 2]) {
          sum1++;
        }
      }
      if (sum0 < sum1) {
        for (j = 1; j <= m; j++) {
          ans1[i].push_back(t[(j + 1) % 2 + (i % 2) * 2]);
        }
      } else {
        for (j = 1; j <= m; j++) {
          ans1[i].push_back(t[j % 2 + (i % 2) * 2]);
        }
      }
    }
    for (i = 1; i <= n; i++) {
      for (j = 1; j <= m; j++) {
        cout << ans1[i][j];
      }
      cout << '\n';
    }
  } else {
    for (i = 1; i <= m; i++) {
      sum0 = 0;
      sum1 = 0;
      for (j = 1; j <= n; j++) {
        if (dime[j][i] != t[(j + 1) % 2 + (i % 2) * 2]) {
          sum0++;
        }
        if (dime[j][i] != t[j % 2 + (i % 2) * 2]) {
          sum1++;
        }
      }
      if (sum0 < sum1) {
        for (j = 1; j <= n; j++) {
          ans1[i].push_back(t[(j + 1) % 2 + (i % 2) * 2]);
        }
      } else {
        for (j = 1; j <= n; j++) {
          ans1[i].push_back(t[j % 2 + (i % 2) * 2]);
        }
      }
    }
    for (i = 1; i <= n; i++) {
      for (j = 1; j <= m; j++) {
        cout << ans1[j][i];
      }
      cout << '\n';
    }
  }
}
