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;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<string> t(n);
  for (int i = 0; i < n; ++i) cin >> t[i];
  char c[] = "ACGT";
  int solc = n * m + 1;
  string sol[2];
  int dir = 0;
  do {
    {
      string tt[2];
      tt[0].resize(m);
      tt[1].resize(m);
      for (int i = 0; i < m; ++i) tt[0][i] = c[i % 4];
      for (int i = 0; i < m; ++i) tt[1][i] = c[(i + 2) % 4];
      int cnt = 0;
      for (int i = 0; i < m; ++i) {
        int res1 = 0, res2 = 0;
        for (int j = 0; j < n; ++j) res1 += t[j][i] != tt[j % 2][i];
        swap(tt[0][i], tt[1][i]);
        for (int j = 0; j < n; ++j) res2 += t[j][i] != tt[j % 2][i];
        swap(tt[0][i], tt[1][i]);
        cnt += min(res1, res2);
        if (res1 > res2) swap(tt[0][i], tt[1][i]);
      }
      if (cnt < solc) {
        dir = 1;
        solc = cnt;
        sol[0] = tt[0];
        sol[1] = tt[1];
      }
    }
    {
      string tt[2];
      tt[0].resize(n);
      tt[1].resize(n);
      for (int i = 0; i < n; ++i) tt[0][i] = c[i % 4];
      for (int i = 0; i < n; ++i) tt[1][i] = c[(i + 2) % 4];
      int cnt = 0;
      for (int i = 0; i < n; ++i) {
        int res1 = 0, res2 = 0;
        for (int j = 0; j < m; ++j) res1 += t[i][j] != tt[j % 2][i];
        swap(tt[0][i], tt[1][i]);
        for (int j = 0; j < m; ++j) res2 += t[i][j] != tt[j % 2][i];
        swap(tt[0][i], tt[1][i]);
        cnt += min(res1, res2);
        if (res1 > res2) swap(tt[0][i], tt[1][i]);
      }
      if (cnt < solc) {
        dir = 2;
        solc = cnt;
        sol[0] = tt[0];
        sol[1] = tt[1];
      }
    }
  } while (next_permutation(c, c + 4));
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (dir == 1) cout << sol[i % 2][j];
      if (dir == 2) cout << sol[j % 2][i];
    }
    cout << '\n';
  }
}
