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 n, m;
string s[300030];
char t[5] = "ACGT";
int min_score = 2e9;
string ans[300030];
string f[300030];
void update() {
  int cnt = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (f[i][j] != s[i][j]) cnt++;
    }
  if (cnt < min_score) {
    min_score = cnt;
    for (int i = 0; i < n; i++) ans[i] = f[i];
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) cin >> s[i];
  int p[4];
  for (int i = 0; i < 4; i++) p[i] = i;
  for (int i = 0; i < n; i++) f[i].resize(m);
  while (1) {
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++) f[i][j] = t[p[2 * (i & 1) + (j & 1)]];
    update();
    for (int j = 0; j < m; j++) {
      int q = 2 * (j & 1);
      int odd = 0, even = 0;
      for (int i = 0; i < n; i++) {
        if (s[i][j] != t[p[q + (i & 1)]]) odd++;
        if (s[i][j] != t[p[q + (1 ^ (i & 1))]]) even++;
      }
      if (odd < even) {
        for (int i = 0; i < n; i++) f[i][j] = t[p[q + (i & 1)]];
      } else {
        for (int i = 0; i < n; i++) f[i][j] = t[p[q + (1 ^ (i & 1))]];
      }
    }
    update();
    for (int i = 0; i < n; i++) {
      int q = 2 * (i & 1);
      int odd = 0, even = 0;
      for (int j = 0; j < m; j++) {
        if (s[i][j] != t[p[q + (j & 1)]]) odd++;
        if (s[i][j] != t[p[q + (1 ^ (j & 1))]]) even++;
      }
      if (odd < even) {
        for (int j = 0; j < m; j++) f[i][j] = t[p[q + (j & 1)]];
      } else {
        for (int j = 0; j < m; j++) f[i][j] = t[p[q + (1 ^ (j & 1))]];
      }
    }
    update();
    if (!next_permutation(p, p + 4)) break;
  }
  for (int i = 0; i < n; i++) cout << ans[i] << endl;
  return 0;
}
