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;
vector<string> ans;
char v[4] = {'A', 'G', 'C', 'T'};
int M = 1e9;
bool type;
int Test(string s, char a, char b, string &res) {
  int cnt = 0;
  for (int i = 0; i < (s.size()); i++) {
    if (i & 1) {
      res += b;
      cnt += (s[i] != b);
    } else {
      res += a;
      cnt += (s[i] != a);
    }
  }
  return cnt;
}
void Solve(vector<string> &table, int n, int m, bool flag) {
  vector<bool> free(4, true);
  for (int i = 0; i < (3); i++) {
    free[i] = false;
    for (int j = i + 1; j < (4); j++) {
      free[j] = false;
      char a, b, c, d;
      for (int k = 0; k < (4); k++)
        if (free[k]) {
          a = v[k];
          free[a] = false;
          break;
        }
      for (int k = 0; k < (4); k++)
        if (free[k]) b = v[k];
      c = v[i], d = v[j];
      vector<string> T(n);
      int tot = 0;
      for (int k = 0; k < n; k += 2) {
        string t1, t2;
        int x = Test(table[k], a, b, t1);
        int y = Test(table[k], b, a, t2);
        T[k] = x < y ? t1 : t2;
        tot += min(x, y);
      }
      for (int k = 1; k < n; k += 2) {
        string t1, t2;
        int x = Test(table[k], c, d, t1);
        int y = Test(table[k], d, c, t2);
        T[k] = x < y ? t1 : t2;
        tot += min(x, y);
      }
      if (tot < M) {
        M = tot;
        ans = T;
        type = flag;
      }
      for (int k = 0; k < (4); k++)
        if (k != i) free[k] = true;
    }
    free[i] = true;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  vector<string> T1(n), T2(m);
  for (int i = 0; i < (n); i++) {
    cin >> T1[i];
    for (int j = 0; j < (m); j++) T2[j] += T1[i][j];
  }
  Solve(T1, n, m, true);
  Solve(T2, m, n, false);
  if (type) {
    for (int i = 0; i < (n); i++) cout << ans[i] << endl;
  } else {
    for (int i = 0; i < (n); i++) {
      for (int j = 0; j < (m); j++) cout << ans[j][i];
      cout << endl;
    }
  }
}
