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 int MOD = 1000000000 + 7;
int n, m;
string s[300000];
char c[4] = {'T', 'G', 'C', 'A'};
string Ans[300000];
int typ[300000];
bool type = 0;
string t[300000];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> s[i];
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) t[i] += s[j][i];
  }
  int ans = 0;
  for (int mask = 0; mask < (1 << 4); mask++) {
    vector<int> bity0, bity1;
    if (__builtin_popcount(mask) != 2) continue;
    for (int i = 0; i < 4; i++)
      if (mask & (1 << i))
        bity0.push_back(i);
      else
        bity1.push_back(i);
    int i00 = bity0[0], i01 = bity0[1], i10 = bity1[0], i11 = bity1[1];
    string frstType, scndType, thrdType, frthType;
    for (int j = 0; j < m; j++) {
      if (j & 1) {
        frstType += c[i00];
        scndType += c[i01];
        thrdType += c[i10];
        frthType += c[i11];
      } else {
        frstType += c[i01];
        scndType += c[i00];
        thrdType += c[i11];
        frthType += c[i10];
      }
    }
    int curAns = 0;
    for (int i = 0; i < n; i++) {
      int cnt1 = 0, cnt2 = 0;
      if (i & 1) {
        for (int j = 0; j < m; j++) {
          cnt1 += frstType[j] == s[i][j];
          cnt2 += scndType[j] == s[i][j];
        }
        curAns += max(cnt1, cnt2);
        if (cnt1 >= cnt2)
          typ[i] = 0;
        else
          typ[i] = 1;
      } else {
        for (int j = 0; j < m; j++) {
          cnt1 += thrdType[j] == s[i][j];
          cnt2 += frthType[j] == s[i][j];
        }
        curAns += max(cnt1, cnt2);
        if (cnt1 >= cnt2)
          typ[i] = 2;
        else
          typ[i] = 3;
      }
    }
    if (curAns > ans) {
      ans = curAns;
      for (int i = 0; i < n; i++) {
        if (typ[i] == 0) Ans[i] = frstType;
        if (typ[i] == 1) Ans[i] = scndType;
        if (typ[i] == 2) Ans[i] = thrdType;
        if (typ[i] == 3) Ans[i] = frthType;
      }
    }
  }
  swap(n, m);
  for (int mask = 0; mask < (1 << 4); mask++) {
    vector<int> bity0, bity1;
    if (__builtin_popcount(mask) != 2) continue;
    for (int i = 0; i < 4; i++)
      if (mask & (1 << i))
        bity0.push_back(i);
      else
        bity1.push_back(i);
    int i00 = bity0[0], i01 = bity0[1], i10 = bity1[0], i11 = bity1[1];
    string frstType, scndType, thrdType, frthType;
    for (int j = 0; j < m; j++) {
      if (j & 1) {
        frstType += c[i00];
        scndType += c[i01];
        thrdType += c[i10];
        frthType += c[i11];
      } else {
        frstType += c[i01];
        scndType += c[i00];
        thrdType += c[i11];
        frthType += c[i10];
      }
    }
    int curAns = 0;
    for (int i = 0; i < n; i++) {
      int cnt1 = 0, cnt2 = 0;
      if (i & 1) {
        for (int j = 0; j < m; j++) {
          cnt1 += frstType[j] == t[i][j];
          cnt2 += scndType[j] == t[i][j];
        }
        curAns += max(cnt1, cnt2);
        if (cnt1 >= cnt2)
          typ[i] = 0;
        else
          typ[i] = 1;
      } else {
        for (int j = 0; j < m; j++) {
          cnt1 += thrdType[j] == t[i][j];
          cnt2 += frthType[j] == t[i][j];
        }
        curAns += max(cnt1, cnt2);
        if (cnt1 >= cnt2)
          typ[i] = 2;
        else
          typ[i] = 3;
      }
    }
    if (curAns > ans) {
      type = 1;
      ans = curAns;
      for (int i = 0; i < n; i++) {
        if (typ[i] == 0) Ans[i] = frstType;
        if (typ[i] == 1) Ans[i] = scndType;
        if (typ[i] == 2) Ans[i] = thrdType;
        if (typ[i] == 3) Ans[i] = frthType;
      }
    }
  }
  swap(n, m);
  if (type == 0) {
    for (int i = 0; i < n; i++) cout << Ans[i] << endl;
  } else {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) cout << Ans[j][i];
      cout << endl;
    }
  }
}
