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;
vector<string> v;
vector<vector<string> > cases = {{"AT", "CG"}, {"AC", "TG"}, {"AG", "CT"}};
vector<string> tmp;
vector<string> best;
int min_score = 1000000000;
void print(vector<string> &m) {
  for (int i = 0; i < m.size(); i++) {
    cout << m[i] << endl;
  }
}
vector<string> transpose(vector<string> &m) {
  vector<string> res;
  res.resize(m[0].size());
  for (int i = 0; i < m.size(); i++) {
    for (int j = 0; j < m[0].size(); j++) {
      res[j] += m[i][j];
    }
  }
  return res;
}
int cmp(string x, string y) {
  int res = 0;
  for (int i = 0; i < x.size(); i++) {
    if (x[i] != y[i]) res++;
  }
  return res;
}
vector<string> build_matrix(vector<string> tab) {
  vector<string> res;
  for (int i = 0; i < v.size(); i++) {
    string str1 = "";
    string str2 = "";
    for (int j = 0; j < v[0].size(); j++) str1 += tab[i % 2][j % 2];
    for (int j = 0; j < v[0].size(); j++) str2 += tab[i % 2][(j + 1) % 2];
    int score1 = cmp(str1, v[i]), score2 = cmp(str2, v[i]);
    res.push_back(score1 < score2 ? str1 : str2);
  }
  return res;
}
int cmp(vector<string> &x, vector<string> &y) {
  int res = 0;
  for (int i = 0; i < x.size(); i++) res += cmp(x[i], y[i]);
  return res;
}
void check(vector<string> tab, bool trans = false) {
  int score;
  tmp = build_matrix(tab);
  score = cmp(v, tmp);
  if (trans) tmp = transpose(tmp);
  if (score < min_score) {
    best = tmp;
    min_score = score;
  }
}
int main() {
  int a, b;
  cin >> a >> b;
  string s;
  for (int i = 0; i < a; i++) {
    cin >> s;
    v.push_back(s);
  }
  for (auto tab : cases) {
    check(tab);
    swap(tab[0], tab[1]);
    check(tab);
    v = transpose(v);
    check(tab, true);
    swap(tab[0], tab[1]);
    check(tab, true);
    v = transpose(v);
  }
  print(best);
}
