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 t[5] = "ACTG";
char s[300010];
vector<int> a[300010];
vector<int> ans[300010];
vector<int> p;
int wh[300010];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%s", s);
    a[i].resize(m);
    for (int j = 0; j < m; j++) {
      for (int k = 0; k < 4; k++) {
        if (t[k] == s[j]) a[i][j] = k;
      }
    }
    ans[i].resize(m);
  }
  for (int i = 0; i < 4; i++) {
    p.push_back(i);
  }
  int be = n * m + 1;
  do {
    int c = 0;
    for (int i = 0; i < n; i++) {
      int s = i & 1 ? 2 : 0;
      for (int j = 0; j < m; j++) {
        if (a[i][j] != p[s]) c++;
        s = s == 3 ? 0 : s + 1;
      }
    }
    if (be > c) {
      be = c;
      for (int i = 0; i < n; i++) {
        int s = i & 1 ? 2 : 0;
        for (int j = 0; j < m; j++) {
          ans[i][j] = p[s];
          s = s == 3 ? 0 : s + 1;
        }
      }
    }
    c = 0;
    for (int i = 0; i < n; i++) {
      int c0 = 0, c1 = 0;
      for (int j = 0; j < m; j++) {
        int s = (i & 1) * 2 + (j & 1);
        if (a[i][j] != p[s]) c0++;
        if (a[i][j] != p[s ^ 1]) c1++;
      }
      if (c0 < c1) {
        c += c0;
        wh[i] = 0;
      } else {
        c += c1;
        wh[i] = 1;
      }
    }
    if (be > c) {
      be = c;
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
          int s = (i & 1) * 2 + (j & 1);
          ans[i][j] = p[s ^ wh[i]];
        }
      }
    }
    c = 0;
    for (int i = 0; i < m; i++) {
      int c0 = 0, c1 = 0;
      for (int j = 0; j < n; j++) {
        int s = (i & 1) * 2 + (j & 1);
        if (a[j][i] != p[s]) c0++;
        if (a[j][i] != p[s ^ 1]) c1++;
      }
      if (c0 < c1) {
        c += c0;
        wh[i] = 0;
      } else {
        c += c1;
        wh[i] = 1;
      }
    }
    if (be > c) {
      be = c;
      for (int i = 0; i < m; i++) {
        for (int j = 0; j < n; j++) {
          int s = (i & 1) * 2 + (j & 1);
          ans[j][i] = p[s ^ wh[i]];
        }
      }
    }
  } while (next_permutation(p.begin(), p.end()));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      putchar(t[ans[i][j]]);
    }
    puts("");
  }
  return 0;
}
