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 = 3e5 + 3;
int n, m;
string s[N];
int ans = N;
string t_ans[N];
string t[N];
void solve(const string &l) {
  int cnt;
  cnt = 0;
  for (int i = 0; i < n; ++i) {
    int start = (i & 1) << 1;
    int curr1 = 0, curr2 = 0;
    string line1, line2;
    for (int j = 0; j < m; ++j) {
      line1.push_back(l[start + (j & 1)]);
      line2.push_back(l[start + 1 - (j & 1)]);
    }
    for (int j = 0; j < m; ++j) {
      curr1 += s[i][j] != line1[j];
      curr2 += s[i][j] != line2[j];
    }
    if (curr1 < curr2)
      t[i] = line1;
    else
      t[i] = line2;
    cnt += min(curr1, curr2);
  }
  if (cnt < ans) {
    for (int i = 0; i < n; ++i) t_ans[i] = t[i];
    ans = cnt;
  }
  cnt = 0;
  for (int i = 0; i < m; ++i) {
    int start = (i & 1) << 1;
    int curr1 = 0, curr2 = 0;
    string line1, line2;
    for (int j = 0; j < n; ++j) {
      line1.push_back(l[start + (j & 1)]);
      line2.push_back(l[start + 1 - (j & 1)]);
    }
    for (int j = 0; j < n; ++j) {
      curr1 += s[j][i] != line1[j];
      curr2 += s[j][i] != line2[j];
    }
    if (curr1 < curr2) {
      for (int j = 0; j < n; ++j) t[j][i] = line1[j];
    } else {
      for (int j = 0; j < n; ++j) t[j][i] = line2[j];
    }
    cnt += min(curr1, curr2);
  }
  if (cnt < ans) {
    for (int i = 0; i < n; ++i) t_ans[i] = t[i];
    ans = cnt;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m;
  for (int i = 0; i < n; ++i) cin >> s[i];
  string letters = "ACGT";
  sort(letters.begin(), letters.end());
  do {
    solve(letters);
  } while (next_permutation(letters.begin(), letters.end()));
  for (int i = 0; i < n; ++i) cout << t_ans[i] << "\n";
}
