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 = 1e8;
const int N = 300100;
int n, m, ans, nans;
string mat[N], ansmat[N], nmat[N];
void upd() {
  if (nans >= ans) return;
  ans = nans;
  for (int i = 0; i < n; ++i) ansmat[i] = nmat[i];
}
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 0; i < n; ++i) cin >> mat[i];
  for (int i = 0; i < n; ++i) ansmat[i] = nmat[i] = mat[i];
  vector<char> v = {'A', 'C', 'G', 'T'};
  ans = INF;
  do {
    nans = 0;
    for (int j = 0; j < m; ++j) {
      int op1 = 0, op2 = 0;
      for (int i = 0; i < n; ++i) {
        op1 += v[2 * (j & 1) + (i & 1)] != mat[i][j];
        op2 += v[2 * (j & 1) + !(i & 1)] != mat[i][j];
      }
      nans += min(op1, op2);
      bool f = op1 > op2;
      for (int i = 0; i < n; ++i) nmat[i][j] = v[2 * (j & 1) + (f ^ (i & 1))];
    }
    upd();
    nans = 0;
    for (int i = 0; i < n; ++i) {
      int op1 = 0, op2 = 0;
      for (int j = 0; j < m; ++j) {
        op1 += v[2 * (i & 1) + (j & 1)] != mat[i][j];
        op2 += v[2 * (i & 1) + !(j & 1)] != mat[i][j];
      }
      nans += min(op1, op2);
      bool f = op1 > op2;
      for (int j = 0; j < m; ++j) nmat[i][j] = v[2 * (i & 1) + (f ^ (j & 1))];
    }
    upd();
  } while (next_permutation(v.begin(), v.end()));
  for (int i = 0; i < n; ++i) cout << ansmat[i] << '\n';
  return 0;
}
