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;
long long poww(long long a, long long b, long long md) {
  return (!b ? 1
             : (b & 1 ? a * poww(a * a % md, b / 2, md) % md
                      : poww(a * a % md, b / 2, md) % md));
}
const long long MAXN = 1e6 + 10;
const long long INF = 8e18;
const long long MOD = 1e9 + 7;
vector<vector<char>> G;
long long n, m;
pair<long long, vector<char>> min_row(long long i, char c1, char c2) {
  pair<long long, vector<char>> ans1, ans2;
  ans1.first = ans2.first = 0;
  for (int j = 0; j < m; j++) {
    if (j & 1)
      ans1.second.push_back(c2);
    else
      ans1.second.push_back(c1);
    if (G[i][j] == ans1.second.back()) ans1.first++;
  }
  for (int j = 0; j < m; j++) {
    if (j & 1)
      ans2.second.push_back(c1);
    else
      ans2.second.push_back(c2);
    if (G[i][j] == ans2.second.back()) ans2.first++;
  }
  return max(ans1, ans2);
}
pair<long long, vector<char>> min_col(long long j, char c1, char c2) {
  pair<long long, vector<char>> ans1, ans2;
  ans1.first = ans2.first = 0;
  for (int i = 0; i < n; i++) {
    if (i & 1)
      ans1.second.push_back(c2);
    else
      ans1.second.push_back(c1);
    if (G[i][j] == ans1.second.back()) ans1.first++;
  }
  for (int i = 0; i < n; i++) {
    if (i & 1)
      ans2.second.push_back(c1);
    else
      ans2.second.push_back(c2);
    if (G[i][j] == ans2.second.back()) ans2.first++;
  }
  return max(ans1, ans2);
}
pair<long long, vector<vector<char>>> row(char c1, char c2) {
  pair<long long, vector<vector<char>>> ans;
  ans.first = 0;
  char c3 = 'N', c4 = 'N';
  if (c1 != 'A' && c2 != 'A' && c3 != 'A') c4 = 'A';
  if (c1 != 'T' && c2 != 'T' && c3 != 'T') c4 = 'T';
  if (c1 != 'C' && c2 != 'C' && c3 != 'C') c4 = 'C';
  if (c1 != 'G' && c2 != 'G' && c3 != 'G') c4 = 'G';
  if (c1 != 'A' && c2 != 'A' && c4 != 'A') c3 = 'A';
  if (c1 != 'T' && c2 != 'T' && c4 != 'T') c3 = 'T';
  if (c1 != 'C' && c2 != 'C' && c4 != 'C') c3 = 'C';
  if (c1 != 'G' && c2 != 'G' && c4 != 'G') c3 = 'G';
  for (int i = 0; i < n; i++) {
    if (i & 1) {
      auto P = min_row(i, c1, c2);
      ans.first += P.first;
      ans.second.push_back(P.second);
    } else {
      auto P = min_row(i, c3, c4);
      ans.first += P.first;
      ans.second.push_back(P.second);
    }
  }
  return ans;
}
void ins_col(vector<vector<char>>& v, vector<char> c, long long j) {
  for (int i = 0; i < n; i++) v[i][j] = c[i];
}
pair<long long, vector<vector<char>>> col(char c1, char c2) {
  pair<long long, vector<vector<char>>> ans;
  ans.first = 0;
  char c3 = 'N', c4 = 'N';
  if (c1 != 'A' && c2 != 'A' && c3 != 'A') c4 = 'A';
  if (c1 != 'T' && c2 != 'T' && c3 != 'T') c4 = 'T';
  if (c1 != 'C' && c2 != 'C' && c3 != 'C') c4 = 'C';
  if (c1 != 'G' && c2 != 'G' && c3 != 'G') c4 = 'G';
  if (c1 != 'A' && c2 != 'A' && c4 != 'A') c3 = 'A';
  if (c1 != 'T' && c2 != 'T' && c4 != 'T') c3 = 'T';
  if (c1 != 'C' && c2 != 'C' && c4 != 'C') c3 = 'C';
  if (c1 != 'G' && c2 != 'G' && c4 != 'G') c3 = 'G';
  ans.second.resize(n);
  for (int i = 0; i < n; i++) ans.second[i].resize(m);
  for (int j = 0; j < m; j++) {
    if (j & 1) {
      auto P = min_col(j, c1, c2);
      ans.first += P.first;
      ins_col(ans.second, P.second, j);
    } else {
      auto P = min_col(j, c3, c4);
      ans.first += P.first;
      ins_col(ans.second, P.second, j);
    }
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  G.resize(n);
  for (int i = 0; i < n; i++) {
    G[i].resize(m);
    for (int j = 0; j < m; j++) cin >> G[i][j];
  }
  pair<long long, vector<vector<char>>> ans;
  ans = row('A', 'G');
  ans = max(ans, row('A', 'C'));
  ans = max(ans, row('A', 'T'));
  ans = max(ans, row('G', 'C'));
  ans = max(ans, row('G', 'T'));
  ans = max(ans, row('C', 'T'));
  ans = max(ans, col('A', 'G'));
  ans = max(ans, col('A', 'C'));
  ans = max(ans, col('A', 'T'));
  ans = max(ans, col('G', 'C'));
  ans = max(ans, col('G', 'T'));
  ans = max(ans, col('C', 'T'));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << ans.second[i][j];
    cout << '\n';
  }
  return 0;
}
