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 score = 1e9;
vector<string> ans;
bool af = false;
void go(const vector<char>& perm, const vector<string>& a, bool flip) {
  int n = a.size();
  int m = a[0].length();
  vector<string> cand(n);
  for (int i = 0; i < n; i++) {
    cand[i] = a[i];
  }
  cand[0][0] = perm[0];
  cand[0][1] = perm[1];
  cand[1][0] = perm[2];
  cand[1][1] = perm[3];
  for (int i = 2; i < n; i++) {
    cand[i][0] = cand[i - 2][0];
    cand[i][1] = cand[i - 2][1];
  }
  for (int j = 2; j < m; j++) {
    int sc1 = 0;
    for (int i = 0; i < n; i++) {
      if (a[i][j] != cand[i][j - 2]) {
        sc1++;
      }
    }
    int sc2 = 0;
    for (int i = 0; i < n; i++) {
      if (a[i][j] != cand[(i + 1) % 2][j - 2]) {
        sc2++;
      }
    }
    if (sc1 < sc2) {
      for (int i = 0; i < n; i++) {
        cand[i][j] = cand[i][j - 2];
      }
    } else {
      for (int i = 0; i < n; i++) {
        cand[i][j] = cand[(i + 1) % 2][j - 2];
      }
    }
  }
  int tot = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] != cand[i][j]) tot++;
    }
  }
  if (tot < score) {
    af = flip;
    score = tot;
    ans = cand;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.precision(12);
  cout << fixed;
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<string> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<char> v;
  v.push_back('A');
  v.push_back('C');
  v.push_back('G');
  v.push_back('T');
  do {
    go(v, a, false);
  } while (next_permutation(v.begin(), v.end()));
  vector<string> a2(m);
  for (int j = 0; j < m; j++) {
    for (int i = 0; i < n; i++) {
      a2[j] += a[i][j];
    }
  }
  sort(v.begin(), v.end());
  do {
    go(v, a2, true);
  } while (next_permutation(v.begin(), v.end()));
  if (af) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        cout << ans[j][i];
      }
      cout << "\n";
    }
  } else {
    for (int i = 0; i < n; i++) {
      cout << ans[i] << "\n";
    }
  }
  return 0;
}
