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;
vector<string> vec_splitter(string s) {
  for (char &c : s) c = c == ',' ? ' ' : c;
  stringstream ss;
  ss << s;
  vector<string> res;
  for (string z; ss >> z; res.push_back(z))
    ;
  return res;
}
void debug_out(vector<string> args, int idx) { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, Head H, Tail... T) {
  if (idx > 0) cerr << ", ";
  stringstream ss;
  ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, T...);
}
void localTest() {}
const long long inf = 1e9;
long long n, m;
vector<string> A;
string fin;
void rowSolve(string a, string b, long long &ans) {
  string curr = "-" + a + b;
  long long cost = 0;
  for (long long i = 0; i < n; ++i) {
    long long c1 = 0, c2 = 0;
    for (long long j = 0; j < m; ++j) {
      c1 += (A[i][j] != a[j & 1]);
      c2 += (A[i][j] != a[(j + 1) & 1]);
    }
    cost += min(c1, c2);
    swap(a, b);
  }
  if (cost < ans) {
    ans = cost;
    fin = curr;
  }
  return;
}
void colSolve(string a, string b, long long &ans) {
  string curr = "|" + a + b;
  long long cost = 0;
  for (long long i = 0; i < m; ++i) {
    long long c1 = 0, c2 = 0;
    for (long long j = 0; j < n; ++j) {
      c1 += (A[j][i] != a[j & 1]);
      c2 += (A[j][i] != a[(j + 1) & 1]);
    }
    cost += min(c1, c2);
    swap(a, b);
  }
  if (cost < ans) {
    ans = cost;
    fin = curr;
  }
  return;
}
void solve() {
  string a = fin.substr(1, 2), b = fin.substr(3, 2);
  if (fin[0] == '-') {
    for (long long i = 0; i < n; ++i) {
      long long c1 = 0, c2 = 0;
      for (long long j = 0; j < m; ++j) {
        c1 += (A[i][j] != a[j & 1]);
        c2 += (A[i][j] != a[(j + 1) & 1]);
      }
      if (c2 < c1) {
        swap(a[0], a[1]);
      }
      for (long long j = 0; j < m; ++j) {
        A[i][j] = a[j & 1];
      }
      if (c2 < c1) {
        swap(a[0], a[1]);
      }
      swap(a, b);
    }
  } else {
    for (long long i = 0; i < m; ++i) {
      long long c1 = 0, c2 = 0;
      for (long long j = 0; j < n; ++j) {
        c1 += (A[j][i] != a[j & 1]);
        c2 += (A[j][i] != a[(j + 1) & 1]);
      }
      if (c2 < c1) {
        swap(a[0], a[1]);
      }
      for (long long j = 0; j < n; ++j) {
        A[j][i] = a[j & 1];
      }
      if (c2 < c1) {
        swap(a[0], a[1]);
      }
      swap(a, b);
    }
  }
}
int main() {
  localTest();
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  long long ans = inf;
  for (long long i = 0; i < n; ++i) {
    string s;
    cin >> s;
    A.push_back(s);
  }
  string perm = "ACGT";
  do {
    string a = perm.substr(0, 2), b = perm.substr(2, 2);
    rowSolve(a, b, ans);
    colSolve(a, b, ans);
  } while (next_permutation((perm).begin(), (perm).end()));
  solve();
  for (long long i = 0; i < n; ++i) {
    cout << A[i] << "\n";
  }
  return 0;
}
