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>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
template <class T>
T gcd(T a, T b) {
  return ((b == 0) ? a : gcd(b, a % b));
}
vector<char> ch = {'A', 'C', 'T', 'G'};
int h(char c) {
  if (c == 'A') return 0;
  if (c == 'C') return 1;
  if (c == 'T') return 2;
  if (c == 'G') return 3;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<string> s(n);
  for (int i = 0; i < (int)(n); i++) cin >> s[i];
  vector<vector<int>> odR(4, vector<int>(n)), evR(4, vector<int>(n)),
      odC(4, vector<int>(m)), evC(4, vector<int>(m));
  for (int i = 0; i < (int)(n); i++)
    for (int j = 0; j < (int)(m); j++) {
      if (j & 1)
        odR[h(s[i][j])][i]++;
      else
        evR[h(s[i][j])][i]++;
      if (i & 1)
        odC[h(s[i][j])][j]++;
      else
        evC[h(s[i][j])][j]++;
    }
  int ans = 1e9;
  pair<int, vector<char>> bst;
  for (int i = 0; i < (int)(4); i++)
    for (int j = (int)(i + 1); j < (int)(4); j++) {
      pair<char, char> p = {ch[i], ch[j]};
      pair<char, char> p1 = {'#', '#'};
      for (int d = 0; d < (int)(4); d++)
        if (d != i && d != j) {
          if (p1.first == '#')
            p1.first = ch[d];
          else
            p1.second = ch[d];
        }
      int cur = 0;
      for (int d = 0; d < (int)(n); d++) {
        if (d % 2 == 0) {
          cur += m - max(odR[h(p.first)][d] + evR[h(p.second)][d],
                         odR[h(p.second)][d] + evR[h(p.first)][d]);
        } else {
          cur += m - max(odR[h(p1.first)][d] + evR[h(p1.second)][d],
                         odR[h(p1.second)][d] + evR[h(p1.first)][d]);
        }
      }
      if (cur < ans) {
        ans = cur;
        vector<char> c = {p.first, p.second, p1.first, p1.second};
        bst = make_pair(0, c);
      }
    }
  for (int i = 0; i < (int)(4); i++)
    for (int j = (int)(i + 1); j < (int)(4); j++) {
      pair<char, char> p = {ch[i], ch[j]};
      pair<char, char> p1 = {'#', '#'};
      for (int d = 0; d < (int)(4); d++)
        if (d != i && d != j) {
          if (p1.first == '#')
            p1.first = ch[d];
          else
            p1.second = ch[d];
        }
      int cur = 0;
      for (int d = 0; d < (int)(m); d++) {
        if (d % 2 == 0) {
          cur += n - max(odC[h(p.first)][d] + evC[h(p.second)][d],
                         odC[h(p.second)][d] + evC[h(p.first)][d]);
        } else {
          cur += n - max(odC[h(p1.first)][d] + evC[h(p1.second)][d],
                         odC[h(p1.second)][d] + evC[h(p1.first)][d]);
        }
      }
      if (cur < ans) {
        ans = cur;
        vector<char> c = {p.first, p.second, p1.first, p1.second};
        bst = make_pair(1, c);
      }
    }
  pair<char, char> p = {bst.second[0], bst.second[1]};
  pair<char, char> p1 = {bst.second[2], bst.second[3]};
  if (!bst.first) {
    for (int d = 0; d < (int)(n); d++) {
      if (d % 2 == 0) {
        if ((odR[h(p.first)][d] + evR[h(p.second)][d]) >
            (odR[h(p.second)][d] + evR[h(p.first)][d])) {
          for (int i = 0; i < (int)(m); i++) {
            if (i % 2 == 0)
              cout << p.second;
            else
              cout << p.first;
          }
        } else {
          for (int i = 0; i < (int)(m); i++) {
            if (i % 2 == 0)
              cout << p.first;
            else
              cout << p.second;
          }
        }
      } else {
        if ((odR[h(p1.first)][d] + evR[h(p1.second)][d]) >
            (odR[h(p1.second)][d] + evR[h(p1.first)][d])) {
          for (int i = 0; i < (int)(m); i++) {
            if (i % 2 == 0)
              cout << p1.second;
            else
              cout << p1.first;
          }
        } else {
          for (int i = 0; i < (int)(m); i++) {
            if (i % 2 == 0)
              cout << p1.first;
            else
              cout << p1.second;
          }
        }
      }
      cout << endl;
    }
  } else {
    vector<vector<char>> an(n, vector<char>(m));
    for (int d = 0; d < (int)(m); d++) {
      if (d % 2 == 0) {
        if ((odC[h(p.first)][d] + evC[h(p.second)][d]) >
            (odC[h(p.second)][d] + evC[h(p.first)][d])) {
          for (int i = 0; i < (int)(n); i++) {
            if (i % 2 == 0)
              an[i][d] = p.second;
            else
              an[i][d] = p.first;
          }
        } else {
          for (int i = 0; i < (int)(n); i++) {
            if (i % 2 == 0)
              an[i][d] = p.first;
            else
              an[i][d] = p.second;
          }
        }
      } else {
        if ((odC[h(p1.first)][d] + evC[h(p1.second)][d]) >
            (odC[h(p1.second)][d] + evC[h(p1.first)][d])) {
          for (int i = 0; i < (int)(n); i++) {
            if (i % 2 == 0)
              an[i][d] = p1.second;
            else
              an[i][d] = p1.first;
          }
        } else {
          for (int i = 0; i < (int)(n); i++) {
            if (i % 2 == 0)
              an[i][d] = p1.first;
            else
              an[i][d] = p1.second;
          }
        }
      }
    }
    for (int i = 0; i < (int)(n); i++) {
      for (int j = 0; j < (int)(m); j++) cout << an[i][j];
      cout << endl;
    }
  }
  return 0;
}
