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;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int N = 200200;
string a[N];
string ans[N];
string cur[N];
char ALP[] = "AGCT";
int n, m;
int bestScore;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cur[i] = a[i];
  }
  bestScore = n * m + 1;
  for (int xx = 0; xx < 4; xx++)
    for (int yy = 0; yy < xx; yy++) {
      int score = 0;
      int x = xx;
      int y = yy;
      int u = 0;
      while (u == x || u == y) u++;
      int w = x ^ y ^ u;
      for (int i = 0; i < n; i++) {
        swap(x, u);
        swap(y, w);
        int s1 = 0, s2 = 0;
        string p1, p2;
        p1.resize(m);
        p2.resize(m);
        for (int j = 0; j < m; j++) {
          swap(x, y);
          p1[j] = ALP[x];
          p2[j] = ALP[y];
          if (p1[j] != a[i][j]) s1++;
          if (p2[j] != a[i][j]) s2++;
        }
        if (s2 < s1) {
          swap(s1, s2);
          swap(p1, p2);
        }
        score += s1;
        for (int j = 0; j < m; j++) cur[i][j] = p1[j];
      }
      if (score < bestScore) {
        bestScore = score;
        for (int i = 0; i < n; i++) ans[i] = cur[i];
      }
      score = 0;
      x = xx;
      y = yy;
      u = 0;
      while (u == x || u == y) u++;
      w = x ^ y ^ u;
      for (int i = 0; i < m; i++) {
        swap(x, u);
        swap(y, w);
        int s1 = 0, s2 = 0;
        string p1, p2;
        p1.resize(n);
        p2.resize(n);
        for (int j = 0; j < n; j++) {
          swap(x, y);
          p1[j] = ALP[x];
          p2[j] = ALP[y];
          if (p1[j] != a[j][i]) s1++;
          if (p2[j] != a[j][i]) s2++;
        }
        if (s2 < s1) {
          swap(s1, s2);
          swap(p1, p2);
        }
        score += s1;
        for (int j = 0; j < n; j++) cur[j][i] = p1[j];
      }
      if (score < bestScore) {
        bestScore = score;
        for (int i = 0; i < n; i++) ans[i] = cur[i];
      }
    }
  for (int i = 0; i < n; i++) cout << ans[i] << "\n";
  return 0;
}
