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;
char ele[4] = {'A', 'C', 'G', 'T'};
int id[6][4] = {{0, 1, 2, 3}, {0, 2, 1, 3}, {0, 3, 1, 2},
                {1, 2, 0, 3}, {1, 3, 0, 2}, {2, 3, 0, 1}};
int n, m;
int solve1(vector<vector<char> > &A, vector<vector<char> > &ans) {
  int res = n * m + 1;
  for (int ti = 0; ti < 6; ti++) {
    vector<vector<char> > B = A;
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      int tmp[2] = {0};
      for (int j = 0; j < m; j++)
        for (int k = 0; k < 2; k++) {
          tmp[k] += (A[i][j] != ele[id[ti][2 * (i & 1) + ((j & 1) ^ k)]]);
        }
      int select = tmp[0] < tmp[1] ? 0 : 1;
      cnt += tmp[select];
      for (int j = 0; j < m; j++)
        B[i][j] = ele[id[ti][2 * (i & 1) + ((j & 1) ^ select)]];
    }
    if (cnt < res) {
      res = cnt;
      ans = B;
    }
  }
  return res;
}
int solve2(vector<vector<char> > &A, vector<vector<char> > &ans) {
  int res = n * m + 1;
  for (int ti = 0; ti < 6; ti++) {
    vector<vector<char> > B = A;
    int cnt = 0;
    for (int i = 0; i < m; i++) {
      int tmp[2] = {0};
      for (int j = 0; j < n; j++)
        for (int k = 0; k < 2; k++) {
          tmp[k] += (A[j][i] != ele[id[ti][2 * (i & 1) + ((j & 1) ^ k)]]);
        }
      int select = tmp[0] < tmp[1] ? 0 : 1;
      cnt += tmp[select];
      for (int j = 0; j < n; j++)
        B[j][i] = ele[id[ti][2 * (i & 1) + ((j & 1) ^ select)]];
    }
    if (cnt < res) {
      res = cnt;
      ans = B;
    }
  }
  return res;
}
const int N = 3e5 + 10;
char s[N];
void print(vector<vector<char> > &A) {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) printf("%c", A[i][j]);
    puts("");
  }
}
int main() {
  scanf("%d%d", &n, &m);
  vector<vector<char> > A(n, vector<char>(m));
  for (int i = 0; i < n; i++) {
    scanf("%s", s);
    for (int j = 0; j < m; j++) A[i][j] = s[j];
  }
  vector<vector<char> > ans1, ans2;
  int res1 = solve1(A, ans1), res2 = solve2(A, ans2);
  if (res1 < res2)
    print(ans1);
  else
    print(ans2);
}
