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 main() {
  int n, m;
  string s;
  cin >> n >> m;
  char c1[n][m], c2[m][n];
  vector<vector<char> > bcn(2, vector<char>(n));
  vector<vector<char> > bcm(2, vector<char>(m));
  vector<vector<char> > cn(2, vector<char>(n));
  vector<vector<char> > cm(2, vector<char>(m));
  bool usen = true;
  int res = n * m;
  for (int i = 0; i < n; ++i) {
    cin >> s;
    for (int j = 0; j < m; ++j) {
      c1[i][j] = s[j];
      c2[j][i] = s[j];
    }
  }
  s = "ACGT";
  do {
    int cur = 0;
    for (int i = 0; i < m; ++i) {
      char cp[2];
      cp[0] = s[(i % 2) * 2];
      cp[1] = s[(i % 2) * 2 + 1];
      int cc[2];
      cc[0] = 0;
      cc[1] = 0;
      for (int j = 0; j < n; ++j) {
        if (c2[i][j] != cp[0]) cc[j % 2]++;
        if (c2[i][j] != cp[1]) cc[(j + 1) % 2]++;
      }
      if (cc[0] < cc[1]) {
        cm[0][i] = cp[0];
        cm[1][i] = cp[1];
      } else {
        cm[0][i] = cp[1];
        cm[1][i] = cp[0];
      }
      cur += min(cc[0], cc[1]);
    }
    if (cur < res) {
      res = cur;
      bcm = cm;
      usen = false;
    }
    cur = 0;
    for (int i = 0; i < n; ++i) {
      char cp[2];
      cp[0] = s[i % 2];
      cp[1] = s[2 + (i % 2)];
      int cc[2];
      cc[0] = 0;
      cc[1] = 0;
      for (int j = 0; j < m; ++j) {
        if (c1[i][j] != cp[0]) cc[j % 2]++;
        if (c1[i][j] != cp[1]) cc[(j + 1) % 2]++;
      }
      if (cc[0] < cc[1]) {
        cn[0][i] = cp[0];
        cn[1][i] = cp[1];
      } else {
        cn[0][i] = cp[1];
        cn[1][i] = cp[0];
      }
      cur += min(cc[0], cc[1]);
    }
    if (cur < res) {
      res = cur;
      bcn = cn;
      usen = true;
    }
  } while (next_permutation(s.begin(), s.end()));
  if (usen) {
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < m; ++j) {
        c1[i][j] = bcn[j % 2][i];
      }
    }
  } else {
    for (int i = 0; i < m; ++i) {
      for (int j = 0; j < n; ++j) {
        c1[j][i] = bcm[j % 2][i];
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) cout << c1[i][j];
    cout << endl;
  }
  return 0;
}
