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;
const int INF = 0x3f3f3f3f;
const long long mod = 1e9 + 7;
const int N = 200005;
string s[6] = {"AGCT", "ACGT", "ATGC", "CTAG", "GTAC", "GCAT"};
string a[N], b[N], tmp[N];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int ans = 0;
  for (int u = 0; u < 6; u++) {
    int sum = 0;
    for (int i = 0; i < n; i++) {
      char x, y;
      if (i % 2 == 0) {
        x = s[u][0], y = s[u][1];
      } else {
        x = s[u][2], y = s[u][3];
      }
      int cnt1 = 0, cnt2 = 0;
      string t1, t2;
      for (int j = 0; j < m; j++) {
        if (j % 2 == 0) {
          if (x == a[i][j]) cnt1++;
          if (y == a[i][j]) cnt2++;
          t1.push_back(x);
          t2.push_back(y);
        } else {
          if (y == a[i][j]) cnt1++;
          if (x == a[i][j]) cnt2++;
          t1.push_back(y);
          t2.push_back(x);
        }
      }
      if (cnt1 >= cnt2) {
        tmp[i] = t1;
        sum += cnt1;
      } else {
        tmp[i] = t2;
        sum += cnt2;
      }
    }
    if (sum > ans) {
      ans = sum;
      for (int i = 0; i < n; i++) {
        b[i] = tmp[i];
      }
    }
  }
  for (int u = 0; u < 6; u++) {
    int sum = 0;
    for (int j = 0; j < m; j++) {
      char x, y;
      if (j % 2 == 0) {
        x = s[u][0], y = s[u][1];
      } else {
        x = s[u][2], y = s[u][3];
      }
      int cnt1 = 0, cnt2 = 0;
      string t1, t2;
      for (int i = 0; i < n; i++) {
        if (i % 2 == 0) {
          if (x == a[i][j]) cnt1++;
          if (y == a[i][j]) cnt2++;
          t1.push_back(x);
          t2.push_back(y);
        } else {
          if (y == a[i][j]) cnt1++;
          if (x == a[i][j]) cnt2++;
          t1.push_back(y);
          t2.push_back(x);
        }
      }
      if (cnt1 >= cnt2) {
        tmp[j] = t1;
        sum += cnt1;
      } else {
        tmp[j] = t2;
        sum += cnt2;
      }
    }
    if (sum > ans) {
      ans = sum;
      for (int i = 0; i < n; i++) {
        b[i].clear();
        for (int j = 0; j < m; j++) {
          b[i].push_back(tmp[j][i]);
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << b[i] << endl;
  }
  return 0;
}
