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;
int n, m;
string row[150005], col[150005];
char ch[] = {'A', 'C', 'G', 'T'};
inline void init() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) cin >> row[i];
  for (int i = 1; i <= m; ++i)
    for (int j = 1; j <= n; ++j) col[i] += row[j][i - 1];
}
string ans;
int ansv = 1e8;
inline string gen(char a, char b, int n) {
  string s = "";
  for (int i = 1; i <= n; ++i) s += i & 1 ? a : b;
  return s;
}
inline int cmp(const string &a, const string &b) {
  int ans = 0;
  for (int i = 0; i < a.size(); ++i)
    if (a[i] != b[i]) ++ans;
  return ans;
}
inline void solve_row(char a, char b, char c, char d) {
  static string s[150005];
  int sv = 0;
  for (int i = 1; i <= n; ++i) {
    char x = i & 1 ? a : c, y = i & 1 ? b : d;
    string s1 = gen(x, y, m), s2 = gen(y, x, m);
    int v1 = cmp(row[i], s1), v2 = cmp(row[i], s2);
    if (v1 < v2)
      s[i] = s1, sv += v1;
    else
      s[i] = s2, sv += v2;
    if (sv >= ansv) return;
  }
  ansv = sv;
  ans = "";
  for (int i = 1; i <= n; ++i) ans += s[i] + '\n';
}
inline void solve_col(char a, char b, char c, char d) {
  static string s[150005];
  int sv = 0;
  for (int i = 1; i <= m; ++i) {
    char x = i & 1 ? a : c, y = i & 1 ? b : d;
    string s1 = gen(x, y, n), s2 = gen(y, x, n);
    int v1 = cmp(col[i], s1), v2 = cmp(col[i], s2);
    if (v1 < v2)
      s[i] = s1, sv += v1;
    else
      s[i] = s2, sv += v2;
    if (sv >= ansv) return;
  }
  ansv = sv;
  ans = "";
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) ans += s[j][i - 1];
    ans += '\n';
  }
}
inline void solve() {
  for (int i = 0; i < 4; ++i)
    for (int j = i + 1; j < 4; ++j)
      for (int k = 0; k < 4; ++k)
        for (int t = k + 1; t < 4; ++t)
          if (k != i && k != j && t != i && t != j) {
            solve_row(ch[i], ch[j], ch[k], ch[t]);
            solve_col(ch[i], ch[j], ch[k], ch[t]);
          }
  cout << ans;
}
int main() {
  init();
  solve();
  return 0;
}
