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;
char s[300010], cur[5], hang[2][300010];
int num[2][5][300010], mx = -1, n, m;
vector<char> mp[300010], res[300010], now[300010];
void solve() {
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    int t0 = 0, t1 = 0;
    for (int j = 1; j <= m; j++) {
      char a, b;
      if (i % 2) {
        a = cur[1];
        b = cur[2];
      } else {
        a = cur[3];
        b = cur[4];
      }
      if (j % 2 == 0) swap(a, b);
      if (mp[i][j] == a)
        t0++;
      else if (mp[i][j] == b)
        t1++;
    }
    for (int j = 1; j <= m; j++) {
      char a, b;
      if (i % 2) {
        a = cur[1];
        b = cur[2];
      } else {
        a = cur[3];
        b = cur[4];
      }
      if (j % 2 == 0) swap(a, b);
      if (t0 > t1)
        now[i][j] = a;
      else
        now[i][j] = b;
    }
    sum += max(t0, t1);
  }
  if (sum > mx) {
    swap(res, now);
    mx = sum;
  }
  for (int c = 0; c <= 1; c++)
    for (int x = 1; x <= 4; x++)
      for (int i = 1; i <= m; i++) num[c][x][i] = 0;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      for (int x = 1; x <= 4; x++)
        if (mp[i][j] == cur[x]) num[i % 2][x][j]++;
  sum = 0;
  for (int i = 1; i <= m; i++) {
    int t1, t2, a, b;
    if (i % 2) {
      a = 1;
      b = 3;
    } else {
      a = 2;
      b = 4;
    }
    t1 = num[1][a][i] + num[0][b][i];
    t2 = num[1][b][i] + num[0][a][i];
    if (t2 > t1) swap(a, b);
    sum += max(t1, t2);
    hang[1][i] = cur[a];
    hang[0][i] = cur[b];
  }
  if (sum > mx) {
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= m; j++) res[i][j] = hang[i % 2][j];
    mx = sum;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++)
    for (int j = 0; j <= m; j++) {
      mp[i].push_back('a');
      res[i].push_back('a');
      now[i].push_back('a');
    }
  for (int i = 1; i <= n; i++) {
    scanf("%s", s + 1);
    for (int j = 1; j <= m; j++) mp[i][j] = s[j];
  }
  cur[1] = 'A';
  cur[2] = 'C';
  cur[3] = 'G';
  cur[4] = 'T';
  for (int i = 1; i <= 24; i++) {
    solve();
    next_permutation(cur + 1, cur + 5);
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) printf("%c", res[i][j]);
    puts("");
  }
  return 0;
}
