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 = 300005;
int n, m, ANS;
char c[4];
string s[MAXN];
string t[MAXN];
string ans[MAXN];
void upd() {
  int cnt = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cnt += (s[i][j] != t[i][j]);
  if (cnt < ANS) {
    ANS = cnt;
    for (int i = 0; i < n; i++) ans[i] = t[i];
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    t[i] = s[i];
  }
  c[0] = 'A';
  c[1] = 'T';
  c[2] = 'G';
  c[3] = 'C';
  ANS = n * m + 1;
  do {
    for (int l = 0; l < 2; l++) {
      for (int i = 0; i < n; i++) {
        int dif[2] = {0, 0};
        for (int j = 0; j < 2; j++)
          for (int k = 0; k < m; k++)
            if (c[(((i ^ l) & 1) << 1) | ((k ^ j) & 1)] != s[i][k]) dif[j]++;
        int j = (dif[0] > dif[1]);
        for (int k = 0; k < m; k++)
          t[i][k] = c[(((i ^ l) & 1) << 1) | ((k ^ j) & 1)];
      }
    }
    upd();
    for (int l = 0; l < 2; l++) {
      for (int i = 0; i < m; i++) {
        int dif[2] = {0, 0};
        for (int j = 0; j < 2; j++)
          for (int k = 0; k < n; k++)
            if (c[(((i ^ l) & 1) << 1) | ((k ^ j) & 1)] != s[k][i]) dif[j]++;
        int j = (dif[0] > dif[1]);
        for (int k = 0; k < n; k++)
          t[k][i] = c[(((i ^ l) & 1) << 1) | ((k ^ j) & 1)];
      }
    }
    upd();
  } while (next_permutation(c, c + 4));
  for (int i = 0; i < n; i++, cout << endl)
    for (int j = 0; j < m; j++) cout << ans[i][j];
  return 0;
}
