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;
char Order[] = {'A', 'C', 'G', 'T'};
pair<long long, vector<string> > ans;
long long n, m;
vector<string> s;
pair<long long, vector<string> > check1() {
  pair<long long, vector<string> > ans;
  string S[2][2];
  for (long long i = 0; i < m; i++) {
    S[0][0].push_back(Order[i % 2]);
    S[0][1].push_back(Order[(i + 1) % 2]);
    S[1][0].push_back(Order[2 + (i % 2)]);
    S[1][1].push_back(Order[2 + ((i + 1) % 2)]);
  }
  for (long long i = 0; i < n; i++) {
    long long cnt1 = 0, cnt2 = 0;
    for (long long j = 0; j < m; j++) {
      if (s[i][j] != S[i % 2][0][j]) cnt1++;
      if (s[i][j] != S[i % 2][1][j]) cnt2++;
    }
    if (cnt1 <= cnt2) {
      ans.second.push_back(S[i % 2][0]);
      ans.first += cnt1;
    } else {
      ans.second.push_back(S[i % 2][1]);
      ans.first += cnt2;
    }
  }
  return ans;
}
pair<long long, vector<string> > check2() {
  pair<long long, vector<string> > ans;
  ans.second.resize(n);
  string S[2][2];
  for (long long i = 0; i < n; i++) {
    S[0][0].push_back(Order[i % 2]);
    S[0][1].push_back(Order[(i + 1) % 2]);
    S[1][0].push_back(Order[2 + (i % 2)]);
    S[1][1].push_back(Order[2 + ((i + 1) % 2)]);
  }
  for (long long i = 0; i < m; i++) {
    long long cnt1 = 0, cnt2 = 0;
    for (long long j = 0; j < n; j++) {
      if (s[j][i] != S[i % 2][0][j]) cnt1++;
      if (s[j][i] != S[i % 2][1][j]) cnt2++;
    }
    if (cnt1 <= cnt2) {
      for (long long j = 0; j < n; j++) ans.second[j].push_back(S[i % 2][0][j]);
      ans.first += cnt1;
    } else {
      for (long long j = 0; j < n; j++) ans.second[j].push_back(S[i % 2][1][j]);
      ans.first += cnt2;
    }
  }
  return ans;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  s.resize(n);
  for (long long i = 0; i < n; i++) {
    cin >> s[i];
  }
  ans.first = n * m * 3;
  pair<long long, vector<string> > tmp;
  do {
    if ((tmp = check1()) < ans) ans = tmp;
    if ((tmp = check2()) < ans) ans = tmp;
  } while (next_permutation(Order, Order + 4));
  for (long long i = 0; i < n; i++) cout << ans.second[i] << endl;
  return 0;
}
