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;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  vector<string> t(n);
  for (int i = 0; i < n; i++) cin >> t[i];
  int cost_ans = n * m + 1;
  vector<string> ans;
  vector<char> s{'A', 'C', 'G', 'T'};
  do {
    {
      vector<string> tmp(n, string(m, ' '));
      int cost_tmp = 0;
      char a, b;
      for (int j = 0; j < m; j++) {
        if (j & 1) {
          a = s[1];
          b = s[3];
        } else {
          a = s[0];
          b = s[2];
        }
        int cost_tmp1 = 0, cost_tmp2 = 0;
        for (int i = 0; i < n; i++) {
          if (i & 1)
            cost_tmp1 += (a != t[i][j]);
          else
            cost_tmp1 += (b != t[i][j]);
        }
        swap(a, b);
        for (int i = 0; i < n; i++) {
          if (i & 1)
            cost_tmp2 += (a != t[i][j]);
          else
            cost_tmp2 += (b != t[i][j]);
        }
        if (cost_tmp1 < cost_tmp2) swap(a, b);
        cost_tmp += min(cost_tmp1, cost_tmp2);
        for (int i = 0; i < n; i++) {
          if (i & 1)
            tmp[i][j] = a;
          else
            tmp[i][j] = b;
        }
      }
      if (cost_ans > cost_tmp) {
        cost_ans = cost_tmp;
        ans = tmp;
      }
    }
    {
      vector<string> tmp(n, string(m, ' '));
      int cost_tmp = 0;
      char a, b;
      for (int i = 0; i < n; i++) {
        if (i & 1) {
          a = s[1];
          b = s[3];
        } else {
          a = s[0];
          b = s[2];
        }
        int cost_tmp1 = 0, cost_tmp2 = 0;
        for (int j = 0; j < m; j++) {
          if (j & 1)
            cost_tmp1 += (a != t[i][j]);
          else
            cost_tmp1 += (b != t[i][j]);
        }
        swap(a, b);
        for (int j = 0; j < m; j++) {
          if (j & 1)
            cost_tmp2 += (a != t[i][j]);
          else
            cost_tmp2 += (b != t[i][j]);
        }
        if (cost_tmp1 < cost_tmp2) swap(a, b);
        cost_tmp += min(cost_tmp1, cost_tmp2);
        for (int j = 0; j < m; j++) {
          if (j & 1)
            tmp[i][j] = a;
          else
            tmp[i][j] = b;
        }
      }
      if (cost_ans > cost_tmp) {
        cost_ans = cost_tmp;
        ans = tmp;
      }
    }
  } while (next_permutation(s.begin(), s.end()));
  for (const auto &str : ans) cout << str << "\n";
  return 0;
}
