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;
string str = "ACGT";
int n, m, ansmin = 1e9;
vector<string> s, ans;
void work() {
  vector<string> tmp;
  int thisans = 0;
  for (int i = 0; i < n; i++) tmp.push_back(string(m, '.'));
  string a[2];
  a[0] = str.substr(0, 2), a[1] = str.substr(2);
  int cur = 0, nxt = 1;
  for (int i = 0; i < n; i++) {
    int A = 0, B = 0;
    for (int j = 0; j < m; j++) {
      if (s[i][j] != a[cur][j & 1]) A++;
      if (s[i][j] != a[cur][1 - (j & 1)]) B++;
    }
    if (A > B) {
      thisans += B;
      for (int j = 0; j < m; j++) tmp[i][j] = a[cur][1 - (j & 1)];
    } else {
      thisans += A;
      for (int j = 0; j < m; j++) tmp[i][j] = a[cur][j & 1];
    }
    swap(cur, nxt);
  }
  if (thisans < ansmin) ansmin = thisans, ans = tmp;
  cur = 0;
  nxt = 1;
  thisans = 0;
  for (int i = 0; i < m; i++) {
    int A = 0, B = 0;
    for (int j = 0; j < n; j++) {
      if (s[j][i] != a[cur][j & 1]) A++;
      if (s[j][i] != a[cur][1 - (j & 1)]) B++;
    }
    if (A > B) {
      thisans += B;
      for (int j = 0; j < n; j++) tmp[j][i] = a[cur][1 - (j & 1)];
    } else {
      thisans += A;
      for (int j = 0; j < n; j++) tmp[j][i] = a[cur][j & 1];
    }
    swap(cur, nxt);
  }
  if (thisans < ansmin) ansmin = thisans, ans = tmp;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    string t;
    cin >> t;
    s.push_back(t);
  }
  do {
    work();
  } while (next_permutation(str.begin(), str.end()));
  for (int i = 0; i < n; i++) cout << ans[i] << endl;
  return 0;
}
