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;
vector<string> arr;
int rowcount[4][2][300008] = {0}, colcount[4][2][300008] = {0};
int num(char c) {
  if (c == 'A') return 0;
  if (c == 'T') return 1;
  if (c == 'G') return 2;
  if (c == 'C') return 3;
}
int main() {
  int n, m;
  cin >> n >> m;
  arr.resize(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      char c = arr[i][j];
      rowcount[num(c)][j % 2][i]++;
    }
  }
  for (int j = 0; j < m; j++) {
    for (int i = 0; i < n; i++) {
      char c = arr[i][j];
      colcount[num(c)][i % 2][j]++;
    }
  }
  string patterns[] = {"ATGC", "AGTC", "ACTG", "GCAT", "TCAG", "TGAC"};
  int mini = 300008, pat, row;
  vector<int> ori;
  for (int i = 0; i < 6; i++) {
    string ss = patterns[i];
    char a = ss[0], b = ss[1], c = ss[2], d = ss[3];
    vector<int> tmp;
    int tmptotal = 0;
    for (int j = 0; j < n; j++) {
      int p, q, r, s;
      if (j % 2 == 0) {
        p = rowcount[num(a)][0][j];
        q = rowcount[num(b)][1][j];
        r = rowcount[num(b)][0][j];
        s = rowcount[num(a)][1][j];
      } else {
        p = rowcount[num(c)][0][j];
        q = rowcount[num(d)][1][j];
        r = rowcount[num(d)][0][j];
        s = rowcount[num(c)][1][j];
      }
      if (p + q > r + s) {
        tmp.push_back(0);
        tmptotal += m - p - q;
      } else {
        tmp.push_back(1);
        tmptotal += m - r - s;
      }
    }
    if (tmptotal < mini) {
      mini = tmptotal;
      pat = i;
      row = 1;
      ori = tmp;
    }
  }
  for (int i = 0; i < 6; i++) {
    string ss = patterns[i];
    char a = ss[0], b = ss[1], c = ss[2], d = ss[3];
    vector<int> tmp;
    int tmptotal = 0;
    for (int j = 0; j < m; j++) {
      int p, q, r, s;
      if (j % 2 == 0) {
        p = colcount[num(a)][0][j];
        q = colcount[num(b)][1][j];
        r = colcount[num(b)][0][j];
        s = colcount[num(a)][1][j];
      } else {
        p = colcount[num(c)][0][j];
        q = colcount[num(d)][1][j];
        r = colcount[num(d)][0][j];
        s = colcount[num(c)][1][j];
      }
      if (p + q > r + s) {
        tmp.push_back(0);
        tmptotal += n - p - q;
      } else {
        tmp.push_back(1);
        tmptotal += n - r - s;
      }
    }
    if (tmptotal < mini) {
      mini = tmptotal;
      pat = i;
      row = 0;
      ori = tmp;
    }
  }
  vector<vector<char> > out(n);
  for (int i = 0; i < n; i++) out[i].resize(m);
  if (row) {
    string pp = patterns[pat];
    for (int i = 0; i < n; i++) {
      char a, b;
      if (i % 2 == 0) {
        a = pp[0], b = pp[1];
      } else {
        a = pp[2], b = pp[3];
      }
      string ss = "";
      if (ori[i] % 2 == 0) {
        ss.push_back(a);
        ss.push_back(b);
      } else {
        ss.push_back(b);
        ss.push_back(a);
      }
      for (int j = 0; j < m; j++) out[i][j] = ss[j % 2];
    }
  } else {
    string pp = patterns[pat];
    for (int j = 0; j < m; j++) {
      char a, b;
      if (j % 2 == 0) {
        a = pp[0], b = pp[1];
      } else {
        a = pp[2], b = pp[3];
      }
      string ss = "";
      if (ori[j] % 2 == 0) {
        ss.push_back(a);
        ss.push_back(b);
      } else {
        ss.push_back(b);
        ss.push_back(a);
      }
      for (int i = 0; i < n; i++) out[i][j] = ss[i % 2];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cout << out[i][j];
    cout << endl;
  }
  return 0;
}
