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 maxn = 3e5 + 5;
const char lib[6][2] = {{'A', 'C'}, {'A', 'T'}, {'A', 'G'},
                        {'C', 'T'}, {'C', 'G'}, {'G', 'T'}};
int n, m;
int order[2][maxn][6], sum[2][maxn];
int op = 0, ch = 0;
string out[maxn];
string s[maxn];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> s[i];
  memset(sum, 0, sizeof(sum));
  for (int i = 0; i < n; i++) {
    for (int k = 0; k < 6; k++) {
      int cnt1 = 0, cnt2 = 0;
      for (int j = 0; j < m; j++) {
        cnt1 += (s[i][j] != lib[(i & 1) ? 5 - k : k][j & 1]);
        cnt2 += (s[i][j] != lib[(i & 1) ? 5 - k : k][(j & 1) ^ 1]);
      }
      order[0][i][k] = cnt1 < cnt2 ? 0 : 1;
      sum[0][k] += min(cnt1, cnt2);
    }
  }
  for (int j = 0; j < m; j++) {
    for (int k = 0; k < 6; k++) {
      int cnt1 = 0, cnt2 = 0;
      for (int i = 0; i < n; i++) {
        cnt1 += (s[i][j] != lib[(j & 1) ? 5 - k : k][i & 1]);
        cnt2 += (s[i][j] != lib[(j & 1) ? 5 - k : k][(i & 1) ^ 1]);
      }
      order[1][j][k] = cnt1 < cnt2 ? 0 : 1;
      sum[1][k] += min(cnt1, cnt2);
    }
  }
  int plk = 0X3f3f3f3f;
  for (int i = 0; i <= 1; i++)
    for (int r = 0; r < 6; r++)
      if (sum[i][r] < plk) {
        plk = sum[i][r], op = i, ch = r;
      }
  for (int i = 0; i < n; i++) out[i] = "";
  if (op == 0) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++)
        out[i] += lib[(i & 1) ? 5 - ch : ch][(j & 1) ^ order[0][i][ch]];
    }
  } else {
    for (int j = 0; j < m; j++) {
      for (int i = 0; i < n; i++)
        out[i] += lib[(j & 1) ? 5 - ch : ch][(i & 1) ^ order[1][j][ch]];
    }
  }
  for (int i = 0; i < n; i++) cout << out[i] << endl;
  return 0;
}
