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;
string toTry[6][2] = {{"AT", "CG"}, {"AC", "TG"}, {"AG", "CT"},
                      {"CG", "AT"}, {"CT", "AG"}, {"GT", "AC"}};
pair<int, int> solve(vector<vector<int>>& arr) {
  int n = arr.size(), m = arr[0].size();
  int best = 0x3f3f3f3f, bestT = 0;
  for (int t = 0; t < 6; t++) {
    int sum = 0;
    for (int i = 0; i < n; i++) {
      string test = toTry[t][i % 2];
      int T1 = 0, T2 = 0;
      for (int j = 0; j < m; j++) {
        if (arr[i][j] != test[j % 2]) T1++;
        if (arr[i][j] != test[(j + 1) % 2]) T2++;
      }
      sum += min(T1, T2);
    }
    if (sum < best) {
      best = sum;
      bestT = t;
    }
  }
  return {best, bestT};
}
void construct(vector<vector<int>>& arr, int t) {
  int n = arr.size(), m = arr[0].size();
  for (int i = 0; i < n; i++) {
    string test = toTry[t][i % 2];
    int T1 = 0, T2 = 0;
    for (int j = 0; j < m; j++) {
      if (arr[i][j] != test[j % 2]) T1++;
      if (arr[i][j] != test[(j + 1) % 2]) T2++;
    }
    int bias = T1 < T2 ? 0 : 1;
    for (int j = 0; j < m; j++) arr[i][j] = test[(j + bias) % 2];
  }
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  vector<vector<int>> orig(n, vector<int>(m));
  vector<vector<int>> trans(m, vector<int>(n));
  char g[300100];
  for (int i = 0; i < n; i++) {
    scanf("%s", g);
    for (int j = 0; j < m; j++) {
      orig[i][j] = g[j];
      trans[j][i] = g[j];
    }
  }
  pair<int, int> O = solve(orig);
  pair<int, int> T = solve(trans);
  if (O.first < T.first) {
    construct(orig, O.second);
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) printf("%c", (char)orig[i][j]);
      printf("\n");
    }
  } else {
    construct(trans, T.second);
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) printf("%c", (char)trans[j][i]);
      printf("\n");
    }
  }
}
