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 N = 300003;
const int M = 12;
char pat[M][2] = {'A', 'G', 'C', 'T', 'G', 'A', 'T', 'C', 'A', 'C', 'G', 'T',
                  'C', 'A', 'T', 'G', 'A', 'T', 'C', 'G', 'T', 'A', 'G', 'C'};
int from[M][2] = {1, 3, 0, 2, 1, 3,  0, 2,  5, 7,  4, 6,
                  5, 7, 4, 6, 9, 11, 8, 10, 9, 11, 8, 10};
int n, m, ans, w0, w1, o;
int an[N][M], am[N][M], pre[N][M], b[2][M], con[N];
char s[N];
int main() {
  scanf("%d%d", &n, &m);
  ans = m * n;
  for (int i = 0; i < n; i++) {
    scanf("%s", s);
    for (int j = 0; j < m; j++)
      for (int k = 0; k < M; k++) {
        if (s[j] != pat[k][j & 1]) an[i][k]++;
        if (s[j] != pat[k][i & 1]) am[j][k]++;
      }
  }
  for (int i = 0; i < M; i++) b[0][i] = an[0][i];
  o = 0;
  for (int i = 1; i < n; i++) {
    o = 1 - o;
    for (int k = 0; k < M; k++) {
      w0 = from[k][0];
      w1 = from[k][1];
      if (b[1 - o][w0] <= b[1 - o][w1]) {
        b[o][k] = b[1 - o][w0] + an[i][k];
        pre[i][k] = w0;
      } else {
        b[o][k] = b[1 - o][w1] + an[i][k];
        pre[i][k] = w1;
      }
    }
  }
  for (int i = 0; i < M; i++)
    if (ans > b[o][i]) {
      ans = b[o][i];
      w0 = i;
    }
  for (int i = n - 1; i >= 0; i--) {
    con[i] = w0;
    w0 = pre[i][w0];
  }
  for (int i = 0; i < M; i++) b[0][i] = am[0][i];
  o = 0;
  for (int i = 1; i < m; i++) {
    o = 1 - o;
    for (int k = 0; k < M; k++) {
      w0 = from[k][0];
      w1 = from[k][1];
      if (b[1 - o][w0] <= b[1 - o][w1]) {
        b[o][k] = b[1 - o][w0] + am[i][k];
        pre[i][k] = w0;
      } else {
        b[o][k] = b[1 - o][w1] + am[i][k];
        pre[i][k] = w1;
      }
    }
  }
  w1 = 0;
  for (int i = 0; i < M; i++)
    if (ans > b[o][i]) {
      ans = b[o][i];
      w0 = i;
      w1 = 1;
    }
  if (w1) {
    for (int i = m - 1; i >= 0; i--) {
      con[i] = w0;
      w0 = pre[i][w0];
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) printf("%c", pat[con[j]][i & 1]);
      printf("\n");
    }
  } else {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) printf("%c", pat[con[i]][j & 1]);
      printf("\n");
    }
  }
  return 0;
}
