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;
inline int in() {
  int x, y;
  y = scanf("%d", &x);
  return x;
}
const int N = 300 * 1000 + 100;
string a[N];
char ch[] = {'A', 'C', 'T', 'G'};
int n, m;
int mnAns;
bool pr;
int state[N];
int solve_row() {
  char c[2][2] = {{ch[0], ch[1]}, {ch[2], ch[3]}};
  int sum = 0;
  for (int i = 0; i < n; i++) {
    char* d = c[i % 2];
    int diff[2] = {0, 0};
    for (int j = 0; j < m; j++) diff[0] += (a[i][j] != d[j % 2]);
    for (int j = 0; j < m; j++) diff[1] += (a[i][j] != d[(1 + j) % 2]);
    state[i] = (diff[0] >= diff[1]);
    sum += min(diff[0], diff[1]);
  }
  if (pr && sum == mnAns) {
    for (int i = 0; i < n; i++) {
      char* d = c[i % 2];
      for (int j = 0; j < m; j++) cout << d[(state[i] + j) % 2];
      cout << '\n';
    }
    exit(0);
  }
  return sum;
}
int solve_col() {
  char c[2][2] = {{ch[0], ch[1]}, {ch[2], ch[3]}};
  int sum = 0;
  for (int j = 0; j < m; j++) {
    char* d = c[j % 2];
    int diff[2] = {0, 0};
    for (int i = 0; i < n; i++) diff[0] += (a[i][j] != d[i % 2]);
    for (int i = 0; i < n; i++) diff[1] += (a[i][j] != d[(1 + i) % 2]);
    state[j] = (diff[0] >= diff[1]);
    sum += min(diff[0], diff[1]);
  }
  if (pr && sum == mnAns) {
    for (int j = 0; j < m; j++) {
      char* d = c[j % 2];
      for (int i = 0; i < n; i++) a[i][j] = d[(state[j] + i) % 2];
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) cout << a[i][j];
      cout << '\n';
    }
    exit(0);
  }
  return sum;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i];
  mnAns = n * m + 1;
  do {
    mnAns = min(mnAns, solve_row());
    mnAns = min(mnAns, solve_col());
  } while (next_permutation(ch, ch + 4));
  pr = true;
  do {
    solve_row();
    solve_col();
  } while (next_permutation(ch, ch + 4));
  return 0;
}
