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;
static inline void canhazfast() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
}
template <typename T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <typename T>
T extgcd(T a, T b, T &x, T &y) {
  T x0 = 1, y0 = 0, x1 = 0, y1 = 1;
  while (b) {
    T q = a / b;
    a %= b;
    swap(a, b);
    x0 -= q * x1;
    swap(x0, x1);
    y0 -= q * y1;
    swap(y0, y1);
  }
  x = x0;
  y = y0;
  return a;
}
int ctz(unsigned x) { return __builtin_ctz(x); }
int ctzll(unsigned long long x) { return __builtin_ctzll(x); }
int clz(unsigned x) { return __builtin_clz(x); }
int clzll(unsigned long long x) { return __builtin_clzll(x); }
int popcnt(unsigned x) { return __builtin_popcount(x); }
int popcntll(unsigned long long x) { return __builtin_popcountll(x); }
int bsr(unsigned x) { return 31 ^ clz(x); }
int bsrll(unsigned long long x) { return 63 ^ clzll(x); }
vector<string> a, b, ans;
int calc_rows(int n, int m, string s) {
  int res = 0;
  for (int i = 0; i < n; ++i) {
    int c[2] = {};
    int p = i % 2 * 2;
    int w;
    for (int j = 0; j < m; ++j) {
      for (int k : {0, 1}) c[k] += (a[i][j] != s[p ^ (j % 2) ^ k]);
    }
    if (c[0] < c[1])
      w = 0;
    else
      w = 1;
    res += c[w];
    for (int j = 0; j < m; ++j) b[i][j] = s[p ^ (j % 2) ^ w];
  }
  return res;
}
int calc_cols(int n, int m, string s) {
  int res = 0;
  for (int j = 0; j < m; ++j) {
    int c[2] = {};
    int p = j % 2 * 2;
    int w;
    for (int i = 0; i < n; ++i) {
      for (int k : {0, 1}) c[k] += (a[i][j] != s[p ^ (i % 2) ^ k]);
    }
    if (c[0] < c[1])
      w = 0;
    else
      w = 1;
    res += c[w];
    for (int i = 0; i < n; ++i) b[i][j] = s[p ^ (i % 2) ^ w];
  }
  return res;
}
int main() {
  canhazfast();
  int n, m, tmp, lo;
  string s = "ACGT";
  cin >> n >> m;
  a.resize(n);
  ans.resize(n);
  lo = n * m + 1;
  for (int i = 0; i < n; ++i) cin >> a[i];
  b = a;
  do {
    tmp = calc_rows(n, m, s);
    if (lo > tmp) lo = tmp, ans = b;
    tmp = calc_cols(n, m, s);
    if (lo > tmp) lo = tmp, ans = b;
  } while (next_permutation((s).begin(), (s).end()));
  for (int i = 0; i < n; ++i) cout << ans[i] << '\n';
  return 0;
}
