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;
inline long long read() {
  char ch = getchar();
  long long p = 1, data = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') p = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    data = data * 10 + (ch ^ 48);
    ch = getchar();
  }
  return p * data;
}
inline long long qpow(long long a, long long b) {
  long long r = 1;
  while (b) {
    if (b & 1) r = a * r;
    a = a * a;
    b >>= 1;
  }
  return r;
}
inline long long gcd(long long a, long long b) {
  if (!a || !b) return (!a) ? b : a;
  while (b ^= a ^= b ^= a %= b)
    ;
  return a;
}
inline long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
void exgcd(long long a, long long b, long long &x, long long &y) {
  if (!b)
    x = 1, y = 0;
  else {
    exgcd(b, a % b, y, x);
    y -= x * (a / b);
  }
}
char s[4] = {'A', 'G', 'C', 'T'};
const int mod = 1e9 + 7, maxn = 3e5 + 5;
int n, m, ans = 0x3f3f3f3f;
vector<vector<char> > mp, pm, tans;
void gao(int a, int b, int c, int d) {
  int now = 0;
  for (int i = 1; i <= n; i++) {
    int tnow = 0, ttnow = 0;
    for (int j = 1; j <= m; j++) {
      char ch;
      if (i & 1) {
        if (j & 1)
          ch = s[a];
        else
          ch = s[b];
      } else {
        if (j & 1)
          ch = s[c];
        else
          ch = s[d];
      }
      tnow += ch != mp[i][j];
    }
    for (int j = 1; j <= m; j++) {
      char ch;
      if (i & 1) {
        if (j & 1)
          ch = s[b];
        else
          ch = s[a];
      } else {
        if (j & 1)
          ch = s[d];
        else
          ch = s[c];
      }
      ttnow += ch != mp[i][j];
    }
    if (tnow < ttnow)
      for (int j = 1; j <= m; j++) {
        char ch;
        if (i & 1) {
          if (j & 1)
            ch = s[a];
          else
            ch = s[b];
        } else {
          if (j & 1)
            ch = s[c];
          else
            ch = s[d];
        }
        pm[i][j] = ch;
      }
    else
      for (int j = 1; j <= m; j++) {
        char ch;
        if (i & 1) {
          if (j & 1)
            ch = s[b];
          else
            ch = s[a];
        } else {
          if (j & 1)
            ch = s[d];
          else
            ch = s[c];
        }
        pm[i][j] = ch;
      }
    now += min(tnow, ttnow);
  }
  if (ans > now) {
    ans = now;
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= m; j++) tans[i][j] = pm[i][j];
  }
  now = 0;
  for (int j = 1; j <= m; j++) {
    int tnow = 0, ttnow = 0;
    for (int i = 1; i <= n; i++) {
      char ch;
      if (j & 1) {
        if (i & 1)
          ch = s[a];
        else
          ch = s[b];
      } else {
        if (i & 1)
          ch = s[c];
        else
          ch = s[d];
      }
      tnow += ch != mp[i][j];
    }
    for (int i = 1; i <= n; i++) {
      char ch;
      if (j & 1) {
        if (i & 1)
          ch = s[b];
        else
          ch = s[a];
      } else {
        if (i & 1)
          ch = s[d];
        else
          ch = s[c];
      }
      ttnow += ch != mp[i][j];
    }
    if (tnow < ttnow)
      for (int i = 1; i <= n; i++) {
        char ch;
        if (j & 1) {
          if (i & 1)
            ch = s[a];
          else
            ch = s[b];
        } else {
          if (i & 1)
            ch = s[c];
          else
            ch = s[d];
        }
        pm[i][j] = ch;
      }
    else
      for (int i = 1; i <= n; i++) {
        char ch;
        if (j & 1) {
          if (i & 1)
            ch = s[b];
          else
            ch = s[a];
        } else {
          if (i & 1)
            ch = s[d];
          else
            ch = s[c];
        }
        pm[i][j] = ch;
      }
    now += min(tnow, ttnow);
  }
  if (ans > now) {
    ans = now;
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= m; j++) tans[i][j] = pm[i][j];
  }
}
int main() {
  n = read(), m = read();
  mp.resize(n + 1), pm.resize(n + 1), tans.resize(n + 1);
  for (int i = 1; i <= n; i++) {
    mp[i].resize(m + 1), pm[i].resize(m + 1), tans[i].resize(m + 1);
    for (int j = 1; j <= m; j++) {
      char c;
      scanf("%c", &c);
      mp[i][j] = c;
    }
    getchar();
  }
  for (int i = 0; i < 4; i++)
    for (int j = 0; j < 4; j++) {
      if (i != j) {
        for (int l = 0; l < 4; l++)
          for (int r = 0; r < 4; r++) {
            if (l == r || l == i || l == j || r == i || r == j) continue;
            gao(i, j, l, r);
          }
      }
    }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) printf("%c", tans[i][j]);
    puts("");
  }
  return 0;
}
