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;
class Timer {
 private:
  string scope_name;
  chrono::high_resolution_clock::time_point start_time;

 public:
  Timer(string name) : scope_name(name) {
    start_time = chrono::high_resolution_clock::now();
  }
  ~Timer() {
    auto stop_time = chrono::high_resolution_clock::now();
    auto length =
        chrono::duration_cast<chrono::microseconds>(stop_time - start_time)
            .count();
    double mlength = double(length) * 0.001;
    ;
  }
};
const long long MOD = 1000000007;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int iNF = 0x3f3f3f3f;
const long long MAXN = 300005;
int n, m;
char tbl[MAXN], bst[MAXN], cur[MAXN];
char get(int x, int y) { return tbl[x * m + y]; }
int test1(vector<char> perm) {
  int ret = 0;
  for (int i = 0; i < n; i += 1) {
    int cnt1 = 0, cnt2 = 0;
    for (int j = 0; j < m; j += 1) {
      cnt1 += get(i, j) != perm[(i & 1) * 2 + (j & 1)];
      cnt2 += get(i, j) != perm[(i & 1) * 2 + (j & 1 ^ 1)];
    }
    ret += min(cnt1, cnt2);
    for (int j = 0; j < m; j += 1) {
      if (cnt1 < cnt2) {
        cur[i * m + j] = perm[(i & 1) * 2 + (j & 1)];
      } else {
        cur[i * m + j] = perm[(i & 1) * 2 + (j & 1 ^ 1)];
      }
    }
  }
  return ret;
}
int test2(vector<char> perm) {
  int ret = 0;
  for (int j = 0; j < m; j += 1) {
    int cnt1 = 0, cnt2 = 0;
    for (int i = 0; i < n; i += 1) {
      cnt1 += get(i, j) != perm[(j & 1) * 2 + (i & 1)];
      cnt2 += get(i, j) != perm[(j & 1) * 2 + (i & 1 ^ 1)];
    }
    ret += min(cnt1, cnt2);
    for (int i = 0; i < n; i += 1) {
      if (cnt1 < cnt2) {
        cur[i * m + j] = perm[(j & 1) * 2 + (i & 1)];
      } else {
        cur[i * m + j] = perm[(j & 1) * 2 + (i & 1 ^ 1)];
      }
    }
  }
  return ret;
}
int main() {
  ;
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n * m; i += 1) {
    cin >> tbl[i];
  }
  vector<char> perm = {'A', 'T', 'G', 'C'};
  sort(perm.begin(), perm.end());
  int ans = iNF;
  do {
    int t1 = test1(perm);
    if (t1 < ans) {
      for (int i = 0; i < n * m; i += 1) {
        bst[i] = cur[i];
      }
      ans = t1;
    }
    int t2 = test2(perm);
    if (t2 < ans) {
      for (int i = 0; i < n * m; i += 1) {
        bst[i] = cur[i];
      }
      ans = t2;
    }
  } while (next_permutation(perm.begin(), perm.end()));
  for (int i = 0; i < n; i += 1) {
    for (int j = 0; j < m; j += 1) {
      cout << bst[i * m + j];
    }
    cout << '\n';
  }
  return 0;
}
