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>
template <typename T>
bool ckmax(T &x, T y) {
  return x < y ? x = y, true : false;
}
template <typename T>
bool ckmin(T &x, T y) {
  return x > y ? x = y, true : false;
}
using namespace std;
const long long inf = (1ll << 60);
const double Pi = acos(-1);
const long long mod = 998244353;
const double eps = 1e-6;
inline long long fpow(long long a, long long b = mod - 2, long long p = mod) {
  a %= p;
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % p;
    a = a * a % p;
    b >>= 1;
  }
  return res;
}
inline long long read() {
  char c = getchar();
  long long x = 0;
  bool f = 0;
  for (; !isdigit(c); c = getchar()) f ^= !(c ^ 45);
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
  if (f) x = -x;
  return x;
}
inline void write(long long x) {
  if (x < 0) {
    putchar('-');
    write(-x);
    return;
  }
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline void writesp(long long x) { write(x), putchar(' '); }
inline void writeln(long long x) {
  write(x);
  putchar('\n');
}
long long n, m;
long long ans = inf;
string s;
vector<char> v = {'A', 'C', 'G', 'T'};
signed main() {
  n = read(), m = read();
  vector<vector<char>> a(n + 5, vector<char>(m + 5)),
      b(n + 5, vector<char>(m + 5)), c(n + 5, vector<char>(m + 5));
  for (long long i = (0), iE = (n - 1); i <= iE; i++) {
    cin >> s;
    for (long long j = (0), jE = (m - 1); j <= jE; j++) a[i][j] = s[j];
  }
  do {
    long long cnt = 0;
    for (long long i = (0), iE = (n - 1); i <= iE; i++) {
      long long A = 0, B = 0, add = (i & 1) << 1;
      for (long long j = (0), jE = (m - 1); j <= jE; j++)
        A += (a[i][j] != v[add + (j & 1)]), B += (a[i][j] != v[add + !(j & 1)]);
      cnt += min(A, B);
      if (A < B)
        for (long long j = (0), jE = (m - 1); j <= jE; j++)
          b[i][j] = v[add + (j & 1)];
      else
        for (long long j = (0), jE = (m - 1); j <= jE; j++)
          b[i][j] = v[add + !(j & 1)];
    }
    if (cnt < ans) {
      ans = cnt;
      for (long long i = (0), iE = (n - 1); i <= iE; i++)
        for (long long j = (0), jE = (m - 1); j <= jE; j++) c[i][j] = b[i][j];
    }
    cnt = 0;
    for (long long j = (0), jE = (m - 1); j <= jE; j++) {
      long long A = 0, B = 0, add = (j & 1) << 1;
      for (long long i = (0), iE = (n - 1); i <= iE; i++)
        A += (a[i][j] != v[add + (i & 1)]), B += (a[i][j] != v[add + !(i & 1)]);
      cnt += min(A, B);
      if (A < B)
        for (long long i = (0), iE = (n - 1); i <= iE; i++)
          b[i][j] = v[add + (i & 1)];
      else
        for (long long i = (0), iE = (n - 1); i <= iE; i++)
          b[i][j] = v[add + !(i & 1)];
    }
    if (cnt < ans) {
      ans = cnt;
      for (long long i = (0), iE = (n - 1); i <= iE; i++)
        for (long long j = (0), jE = (m - 1); j <= jE; j++) c[i][j] = b[i][j];
    }
  } while (next_permutation(v.begin(), v.end()));
  for (long long i = (0), iE = (n - 1); i <= iE; i++) {
    for (long long j = (0), jE = (m - 1); j <= jE; j++) cout << c[i][j];
    puts("");
  }
}
