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 INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = (int)1e9 + 7;
const int N = (int)4e5 + 7;
char t[] = "AGCT";
int cnt[N][4][2];
int gao(vector<char> v[], int n, int m, char o[][2]) {
  memset(cnt, 0, sizeof(cnt));
  for (int i = (0); i < (n); ++i)
    for (int c = (0); c < (4); ++c) {
      for (int j = (0); j < (m); ++j) {
        if (v[i][j] == t[c]) {
          cnt[i][c][j & 1]++;
        }
      }
    }
  int c[4] = {0, 1, 2, 3};
  int ans = 0;
  do {
    if (c[1] < c[0] || c[3] < c[2]) continue;
    int sum = 0;
    for (int i = (0); i < (n); ++i) {
      if (i & 1) {
        sum += max(cnt[i][c[2]][0] + cnt[i][c[3]][1],
                   cnt[i][c[2]][1] + cnt[i][c[3]][0]);
      } else {
        sum += max(cnt[i][c[0]][0] + cnt[i][c[1]][1],
                   cnt[i][c[0]][1] + cnt[i][c[1]][0]);
      }
    }
    if (sum > ans) {
      ans = sum;
      for (int i = (0); i < (n); ++i) {
        if (i & 1) {
          if (cnt[i][c[2]][0] + cnt[i][c[3]][1] >
              cnt[i][c[2]][1] + cnt[i][c[3]][0]) {
            o[i][0] = t[c[2]], o[i][1] = t[c[3]];
          } else {
            o[i][1] = t[c[2]], o[i][0] = t[c[3]];
          }
        } else {
          if (cnt[i][c[0]][0] + cnt[i][c[1]][1] >
              cnt[i][c[0]][1] + cnt[i][c[1]][0]) {
            o[i][0] = t[c[0]], o[i][1] = t[c[1]];
          } else {
            o[i][1] = t[c[0]], o[i][0] = t[c[1]];
          }
        }
      }
    }
  } while (next_permutation(c, c + 4));
  return n * m - ans;
}
char ans[2][N];
int id[36];
vector<char> v[N];
char s[N];
char o[2][N][2];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = (0); i < (n); ++i) scanf("%s", s + i * m);
  for (int i = (0); i < (n); ++i) v[i].resize(m);
  for (int i = (0); i < (n); ++i)
    for (int j = (0); j < (m); ++j) v[i][j] = s[i * m + j];
  int ans = gao(v, n, m, o[0]);
  for (int i = (0); i < (m); ++i) v[i].resize(n);
  for (int i = (0); i < (m); ++i)
    for (int j = (0); j < (n); ++j) v[i][j] = s[j * m + i];
  if (ans > gao(v, m, n, o[1])) {
    for (int i = (0); i < (n); ++i) {
      for (int j = (0); j < (m); ++j) cout << o[1][j][i & 1];
      cout << endl;
    }
  } else {
    for (int i = (0); i < (n); ++i) {
      for (int j = (0); j < (m); ++j) cout << o[0][i][j & 1];
      cout << endl;
    }
  }
  return 0;
}
