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>
const int ms = 3e5 + 19;
using namespace std;
string per = "ACGT";
int n, m, ans = ms;
string c[ms], cer[ms];
bool w[ms];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> c[i];
    cer[i] = c[i];
  }
  do {
    int cur = 0;
    for (int i = 0; i < n; i++) {
      int c1 = 0, c2 = 0;
      for (int j = 0; j < m; j++) {
        c1 += per[(i & 1) * 2 + (j & 1)] != c[i][j];
        c2 += per[(i & 1) * 2 + !(j & 1)] != c[i][j];
      }
      w[i] = c1 < c2;
      cur += min(c1, c2);
    }
    if (cur < ans) {
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
          cer[i][j] =
              w[i] ? per[(i & 1) * 2 + (j & 1)] : per[(i & 1) * 2 + !(j & 1)];
        }
      }
      ans = cur;
    }
    cur = 0;
    for (int i = 0; i < m; i++) {
      int c1 = 0, c2 = 0;
      for (int j = 0; j < n; j++) {
        c1 += per[(i & 1) * 2 + (j & 1)] != c[j][i];
        c2 += per[(i & 1) * 2 + !(j & 1)] != c[j][i];
      }
      w[i] = c1 < c2;
      cur += min(c1, c2);
    }
    if (cur < ans) {
      for (int i = 0; i < m; i++)
        for (int j = 0; j < n; j++)
          cer[j][i] =
              w[i] ? per[(i & 1) * 2 + (j & 1)] : per[(i & 1) * 2 + !(j & 1)];
      ans = cur;
    }
  } while (next_permutation(per.begin(), per.end()));
  for (int i = 0; i < n; i++) cout << cer[i] << "\n";
}
