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 maxn = 3e5 + 100;
int n, m;
string s[maxn], ss[maxn], ans[maxn];
string ns = "AGCT";
string tmp[2];
int tolnum = maxn;
void init(string ss[], string s[]) {
  for (int i = 0; i < n; ++i) {
    ss[i] = s[i];
  }
}
void pt(string ans[]) {
  for (int i = 0; i < n; ++i) {
    cout << ans[i] << endl;
  }
}
void solve_raw() {
  init(ss, s);
  int t_ans = 0;
  for (int i = 0; i < n; ++i) {
    int ind = i % 2;
    int num1 = 0, num2 = 0;
    for (int j = 0; j < m; ++j) {
      if (ss[i][j] != tmp[ind][j % 2]) {
        ++num1;
      }
    }
    swap(tmp[ind][0], tmp[ind][1]);
    for (int j = 0; j < m; ++j) {
      if (ss[i][j] != tmp[ind][j % 2]) {
        ++num2;
      }
    }
    if (num2 > num1) {
      swap(tmp[ind][0], tmp[ind][1]);
    } else
      swap(num1, num2);
    for (int j = 0; j < m; ++j) {
      if (ss[i][j] != tmp[ind][j % 2]) {
        ss[i][j] = tmp[ind][j % 2];
      }
    }
    t_ans += num1;
  }
  if (t_ans < tolnum) {
    init(ans, ss);
    tolnum = t_ans;
  }
}
void solve_con() {
  init(ss, s);
  int t_ans = 0;
  for (int i = 0; i < m; ++i) {
    int ind = i % 2;
    int num1 = 0, num2 = 0;
    for (int j = 0; j < n; ++j) {
      if (ss[j][i] != tmp[ind][j % 2]) {
        ++num1;
      }
    }
    swap(tmp[ind][0], tmp[ind][1]);
    for (int j = 0; j < n; ++j) {
      if (ss[j][i] != tmp[ind][j % 2]) {
        ++num2;
      }
    }
    if (num2 > num1) {
      swap(tmp[ind][0], tmp[ind][1]);
    } else
      swap(num1, num2);
    for (int j = 0; j < n; ++j) {
      if (ss[j][i] != tmp[ind][j % 2]) {
        ss[j][i] = tmp[ind][j % 2];
      }
    }
    t_ans += num1;
  }
  if (t_ans < tolnum) {
    init(ans, ss);
    tolnum = t_ans;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    cin >> s[i];
  }
  for (int i = 0; i < (1 << 4); ++i) {
    if (__builtin_popcount(i) == 2) {
      tmp[0] = tmp[1] = "";
      for (int j = 0; j < 4; ++j) {
        if ((i >> j) & 1) {
          tmp[0] += ns[j];
        } else {
          tmp[1] += ns[j];
        }
      }
      solve_raw();
      solve_con();
    }
  }
  for (int i = 0; i < n; ++i) {
    cout << ans[i] << endl;
  }
  return 0;
}
