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;
int n, m;
vector<string> table;
vector<string> ftable;
int fans = INT_MAX;
void tryRows(string ch) {
  int ans = 0;
  vector<string> t;
  for (int i = 0; i < n; i++) {
    int cnt1 = 0, cnt2 = 0;
    string s1 = "", s2 = "";
    for (int j = 0; j < m; j++) {
      if (table[i][j] != ch[j % 2 + 2 * (i % 2)]) cnt1++;
      s1 += ch[j % 2 + 2 * (i % 2)];
    }
    for (int j = 0; j < m; j++) {
      if (table[i][j] != ch[(j + 1) % 2 + 2 * (i % 2)]) cnt2++;
      s2 += ch[(j + 1) % 2 + 2 * (i % 2)];
    }
    if (cnt1 < cnt2)
      t.push_back(s1);
    else
      t.push_back(s2);
    ans += min(cnt1, cnt2);
  }
  if (ans < fans) {
    ftable = t;
    fans = ans;
  }
}
void tryCols(string ch) {
  int ans = 0;
  vector<string> t;
  for (int i = 0; i < m; i++) {
    int cnt1 = 0, cnt2 = 0;
    string s1 = "", s2 = "";
    for (int j = 0; j < n; j++) {
      if (table[j][i] != ch[j % 2 + 2 * (i % 2)]) cnt1++;
      s1 += ch[j % 2 + 2 * (i % 2)];
    }
    for (int j = 0; j < n; j++) {
      if (table[j][i] != ch[(j + 1) % 2 + 2 * (i % 2)]) cnt2++;
      s2 += ch[(j + 1) % 2 + 2 * (i % 2)];
    }
    if (cnt1 < cnt2)
      t.push_back(s1);
    else
      t.push_back(s2);
    ans += min(cnt1, cnt2);
  }
  if (ans < fans) {
    ftable = t;
    fans = ans;
    for (int i = 0; i < n; i++) {
      string s = "";
      if (i >= ftable.size()) ftable.push_back(s);
      for (int j = 0; j < m; j++) {
        if (ftable[i].size() > j)
          ftable[i][j] = t[j][i];
        else
          ftable[i] += t[j][i];
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    string t;
    cin >> t;
    table.push_back(t);
  }
  string ch = "AGCT";
  int ans = INT_MAX;
  do {
    tryRows(ch);
    tryCols(ch);
  } while (next_permutation(ch.begin(), ch.end()));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << ftable[i][j];
    }
    cout << '\n';
  }
  return 0;
}
