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;
char c[] = {'A', 'G', 'C', 'T'};
vector<vector<char> > a, b, res;
int n, m, ans = (1 << 30);
void col() {
  int cur = 0;
  for (int j = 0; j < m; j++) {
    int p = ((j & 1) ? 0 : 2), cnt[] = {0, 0};
    for (int i = 0, q = 0; i < n; i++, q ^= 1) {
      cnt[0] += (a[i][j] != c[p + q]);
      cnt[1] += (a[i][j] != c[p + (q ^ 1)]);
    }
    cur += min(cnt[0], cnt[1]);
    for (int i = 0, q = 0; i < n; i++, q ^= 1)
      b[i][j] = c[p + (q ^ (cnt[0] < cnt[1] ? 0 : 1))];
  }
  if (cur < ans) {
    ans = cur;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++) res[i][j] = b[i][j];
  }
}
void row() {
  int cur = 0;
  for (int i = 0; i < n; i++) {
    int p = ((i & 1) ? 0 : 2), cnt[] = {0, 0};
    for (int j = 0, q = 0; j < m; j++, q ^= 1) {
      cnt[0] += (a[i][j] != c[p + q]);
      cnt[1] += (a[i][j] != c[p + (q ^ 1)]);
    }
    cur += min(cnt[0], cnt[1]);
    for (int j = 0, q = 0; j < m; j++, q ^= 1)
      b[i][j] = c[p + (q ^ (cnt[0] < cnt[1] ? 0 : 1))];
  }
  if (cur < ans) {
    ans = cur;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++) res[i][j] = b[i][j];
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  a.resize(n), b.resize(n), res.resize(n);
  for (int i = 0; i < n; i++) {
    a[i].resize(m), b[i].resize(m), res[i].resize(m);
    for (int j = 0; j < m; j++) cin >> a[i][j];
  }
  do {
    col();
    row();
  } while (next_permutation(c, c + 4));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << res[i][j];
    cout << endl;
  }
  return 0;
}
