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;
template <class x>
vector<typename x::value_type> tovec(const x& a) {
  return vector<typename x::value_type>(a.begin(), a.end());
}
template <class u>
vector<typename iterator_traits<u>::value_type> tovec(u a, u b) {
  return vector<typename iterator_traits<u>::value_type>(a, b);
}
template <typename x>
ostream& operator<<(ostream& cout, const vector<x>& a) {
  cout << "[";
  if (((int)a.size())) cout << a[0];
  for (int i = 0; i++ < ((int)a.size()) - 1;) cout << ", " << a[i];
  return cout << "]";
}
template <typename u, typename v>
ostream& operator<<(ostream& cout, const pair<u, v>& a) {
  return cout << "(" << a.first << ", " << a.second << ")";
}
int n, m;
vector<string> a;
pair<int, vector<string>> genWithRow(char u1, char u2, char v1, char v2) {
  vector<string> ans(n, string(m + 1, '\n'));
  int cost = 0;
  for (int i = -1; ++i < n;) {
    char x = i & 1 ? u1 : v1;
    char y = i & 1 ? u2 : v2;
    int c1 = 0, c2 = 0;
    for (int f = -1; ++f < m;) {
      char t1 = f & 1 ? x : y;
      char t2 = x + y - t1;
      c1 += t1 != a[i][f];
      c2 += t2 != a[i][f];
    }
    bool s = c1 > c2;
    for (int f = -1; ++f < m;) {
      ans[i][f] = s ? x : y;
      s = !s;
    }
    cost += min(c1, c2);
  }
  return {cost, ans};
}
pair<int, vector<string>> genWithCol(char u1, char u2, char v1, char v2) {
  vector<string> ans(n, string(m + 1, '\n'));
  int cost = 0;
  for (int f = -1; ++f < m;) {
    char x = f & 1 ? u1 : v1;
    char y = f & 1 ? u2 : v2;
    int c1 = 0, c2 = 0;
    for (int i = -1; ++i < n;) {
      char t1 = i & 1 ? x : y;
      char t2 = x + y - t1;
      c1 += t1 != a[i][f];
      c2 += t2 != a[i][f];
    }
    bool s = c1 > c2;
    for (int i = -1; ++i < n;) {
      ans[i][f] = s ? x : y;
      s = !s;
    }
    cost += min(c1, c2);
  }
  return {cost, ans};
}
int main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  a.resize(n);
  for (int i = -1; ++i < n;) cin >> a[i];
  string s = "ACGT";
  pair<int, vector<string>> ans;
  ans.first = INT_MAX;
  do {
    ans = min(ans, genWithRow(s[0], s[1], s[2], s[3]));
    ans = min(ans, genWithCol(s[0], s[1], s[2], s[3]));
  } while (next_permutation(s.begin(), s.end()));
  for (auto i : ans.second) cout << i;
  return 0;
}
