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;
template <class T>
void print(vector<T> s) {
  for (auto x : s) cout << x << " ";
  cout << endl;
}
int solve(vector<vector<char> > &s) {
  int n = s.size(), m = s[0].size();
  vector<char> c = {'A', 'G', 'T', 'C'};
  int answer = 0;
  for (int i = 0; i < 24; i++) {
    int cnt = 0;
    if (c[0] > c[1] || c[2] > c[3]) {
      next_permutation(c.begin(), c.end());
      continue;
    }
    for (int i = 0; i < n; i++) {
      int cnt1 = 0, cnt2 = 0;
      for (int j = 0; j < m; j++) {
        if (s[i][j] == c[((i & 1) << 1) | (j & 1)]) cnt1++;
        if (s[i][j] == c[((i & 1) << 1) | ((j & 1) ^ 1)]) cnt2++;
      }
      cnt += max(cnt1, cnt2);
    }
    answer = max(answer, cnt);
    next_permutation(c.begin(), c.end());
  }
  for (int i = 0; i < 24; i++) {
    int cnt = 0;
    if (c[0] > c[1] || c[2] > c[3]) {
      next_permutation(c.begin(), c.end());
      continue;
    }
    for (int i = 0; i < n; i++) {
      int cnt1 = 0, cnt2 = 0;
      for (int j = 0; j < m; j++) {
        if (s[i][j] == c[((i & 1) << 1) | (j & 1)]) cnt1++;
        if (s[i][j] == c[((i & 1) << 1) | ((j & 1) ^ 1)]) cnt2++;
      }
      cnt += max(cnt1, cnt2);
    }
    if (answer == cnt) {
      for (int i = 0; i < n; i++) {
        int cnt1 = 0, cnt2 = 0;
        for (int j = 0; j < m; j++) {
          if (s[i][j] == c[((i & 1) << 1) | (j & 1)]) cnt1++;
          if (s[i][j] == c[((i & 1) << 1) | ((j & 1) ^ 1)]) cnt2++;
        }
        if (cnt1 > cnt2)
          for (int j = 0; j < m; j++) s[i][j] = c[((i & 1) << 1) | (j & 1)];
        else
          for (int j = 0; j < m; j++)
            s[i][j] = c[((i & 1) << 1) | ((j & 1) ^ 1)];
      }
      return answer;
    }
    next_permutation(c.begin(), c.end());
  }
  assert(false);
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<string> s(n);
  for (int i = 0; i < n; i++) cin >> s[i];
  vector<vector<char> > s1(n, vector<char>(m));
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) s1[i][j] = s[i][j];
  vector<vector<char> > s2(m, vector<char>(n));
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) s2[j][i] = s[i][j];
  int answer1 = solve(s1);
  int answer2 = solve(s2);
  if (answer1 >= answer2) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) cout << s1[i][j];
      cout << "\n";
    }
  } else {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) cout << s2[j][i];
      cout << "\n";
    }
  }
  return 0;
}
