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 N = 330000;
const int INF = 1e9 + 1e8;
char pat[10] = "AGCT";
string pan[N], ans[N], chk[N];
int frq[10][10][300];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> pan[i], ans[i].resize(m), chk[i].resize(m);
  int tot_diff = INF;
  auto solve = [&](char *p) {
    int tot_cnt = 0;
    for (int i = 0; i < n; i++) {
      int cc[2] = {0};
      for (int k2 = 0; k2 < 2; k2++) {
        for (int j = 0; j < m; j++) {
          if (pan[i][j] != p[i % 2 * 2 + (j + k2) % 2]) cc[k2]++;
        }
      }
      int k2 = (cc[0] < cc[1]) ? 0 : 1;
      tot_cnt += cc[k2];
      for (int j = 0; j < m; j++) chk[i][j] = p[i % 2 * 2 + (j + k2) % 2];
    }
    if (tot_diff > tot_cnt) {
      tot_diff = tot_cnt;
      for (int i = 0; i < n; i++) ans[i] = chk[i];
    }
    tot_cnt = 0;
    for (int j = 0; j < m; j++) {
      int cc[2] = {0};
      for (int k1 = 0; k1 < 2; k1++) {
        for (int i = 0; i < n; i++) {
          if (pan[i][j] != p[(i + k1) % 2 * 2 + j % 2]) cc[k1]++;
        }
      }
      int k1 = (cc[0] < cc[1]) ? 0 : 1;
      tot_cnt += cc[k1];
      for (int i = 0; i < n; i++) chk[i][j] = p[(i + k1) % 2 * 2 + j % 2];
    }
    if (tot_diff > tot_cnt) {
      tot_diff = tot_cnt;
      for (int i = 0; i < n; i++) ans[i] = chk[i];
    }
  };
  do {
    solve(pat);
  } while (next_permutation(pat, pat + 4));
  for (int i = 0; i < n; i++) cout << ans[i] << "\n";
  return 0;
}
