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;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  cin >> n >> m;
  vector<string> grid(n);
  for (long long i = 0; i < n; ++i) {
    cin >> grid[i];
  }
  string s = "AGCT";
  vector<long long> perm = {0, 1, 2, 3};
  long long resMinDiff = 1e9;
  vector<string> res;
  do {
    long long sumDiff = 0;
    vector<string> guess(n);
    for (long long i = 0; i < n; ++i) {
      long long add = (i % 2) * 2;
      long long diff0 = 0;
      long long diff1 = 0;
      for (long long j = 0; j < m; ++j) {
        if (grid[i][j] != s[perm[add + j % 2]]) {
          diff0++;
        }
      }
      for (long long j = 0; j < m; ++j) {
        if (grid[i][j] != s[perm[add + (j + 1) % 2]]) {
          diff1++;
        }
      }
      sumDiff += min(diff0, diff1);
      if (diff0 < diff1) {
        string row = "";
        for (long long j = 0; j < m; ++j) {
          row += s[perm[add + j % 2]];
        }
        guess[i] = row;
      } else {
        string row = "";
        for (long long j = 0; j < m; ++j) {
          row += s[perm[add + (j + 1) % 2]];
        }
        guess[i] = row;
      }
    }
    if (resMinDiff > sumDiff) {
      resMinDiff = sumDiff;
      res = guess;
    }
    sumDiff = 0;
    for (long long j = 0; j < m; ++j) {
      long long add = (j % 2) * 2;
      long long diff0 = 0;
      long long diff1 = 0;
      for (long long i = 0; i < n; ++i) {
        if (grid[i][j] != s[perm[add + i % 2]]) {
          diff0++;
        }
      }
      for (long long i = 0; i < n; ++i) {
        if (grid[i][j] != s[perm[add + (i + 1) % 2]]) {
          diff1++;
        }
      }
      sumDiff += min(diff0, diff1);
      if (diff0 < diff1) {
        for (long long i = 0; i < n; ++i) {
          guess[i][j] = s[perm[add + i % 2]];
        }
      } else {
        for (long long i = 0; i < n; ++i) {
          guess[i][j] = s[perm[add + (i + 1) % 2]];
        }
      }
    }
    if (resMinDiff > sumDiff) {
      resMinDiff = sumDiff;
      res = guess;
    }
  } while (next_permutation(perm.begin(), perm.end()));
  for (long long i = 0; i < n; ++i) {
    cout << res[i] << '\n';
  }
  return 0;
}
