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 N = 300010;
string s[N];
string s1[N];
string t[N];
string t1[N];
string tmp1[N];
string tmp[N];
int n, m;
void C1(char a, char b, char c, char d, int l, int &mmin) {
  int sum = 0;
  for (int i = 0; i < s[l].length(); i++) {
    if (i % 2 == 0) {
      tmp[l][i] = a;
      if (s[l][i] != a) sum++;
    } else {
      tmp[l][i] = b;
      if (s[l][i] != b) sum++;
    }
  }
  l++;
  if (l >= n) {
    if (sum < mmin) {
      tmp1[l - 1] = tmp[l - 1];
      mmin = sum;
    }
  }
  for (int i = 0; i < s[l].length(); i++) {
    if (i % 2 == 0) {
      tmp[l][i] = c;
      if (s[l][i] != c) sum++;
    } else {
      tmp[l][i] = d;
      if (s[l][i] != d) sum++;
    }
  }
  if (sum < mmin) {
    tmp1[l - 1] = tmp[l - 1];
    tmp1[l] = tmp[l];
    mmin = sum;
  }
}
int C(char a, char b, char c, char d, int &mmin) {
  int sum = 0;
  for (int i = 0; i < n; i += 2) {
    int mmin = 0x7fffffff;
    C1(a, b, c, d, i, mmin);
    C1(b, a, c, d, i, mmin);
    C1(a, b, d, c, i, mmin);
    C1(b, a, d, c, i, mmin);
    sum += mmin;
  }
  if (sum < mmin) {
    mmin = sum;
    for (int i = 0; i < n; i++) {
      t[i] = tmp1[i];
    }
  }
  return sum;
}
int ss() {
  for (int i = 0; i < n; i++) tmp1[i] = s[i];
  for (int i = 0; i < n; i++) tmp[i] = s[i];
  char ch[] = {'A', 'C', 'G', 'T'};
  int k = 24;
  int ans = 0x7fffffff;
  while (k--) {
    next_permutation(ch, ch + 4);
    C(ch[0], ch[1], ch[2], ch[3], ans);
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> s[i];
  int ans1 = ss();
  for (int i = 0; i < m; i++) s1[i] = string(n, ' ');
  for (int i = 0; i < m; i++) t1[i] = string(n, ' ');
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) s1[j][i] = s[i][j];
  swap(s1, s);
  swap(t1, t);
  swap(n, m);
  int ans2 = ss();
  if (ans1 > ans2)
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++) t1[j][i] = t[i][j];
  for (int i = 0; i < m; i++) cout << t1[i] << endl;
}
