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;
int n, m;
vector<string> dna;
string c[] = {"ACGT", "AGCT", "ATCG", "CGAT", "CTAG", "GTAC"};
int main() {
  cin >> n >> m;
  dna.assign(n, "");
  for (int i = 0; i < n; i++) cin >> dna[i];
  int bestScore = -1;
  int bestPair = 0;
  bool rowBetter = true;
  for (int k = 0; k < 6; k++) {
    char c1 = c[k][0];
    char c2 = c[k][1];
    char c3 = c[k][2];
    char c4 = c[k][3];
    int scoreRow = 0;
    for (int i = 0; i < n; i++) {
      int matchA = 0;
      int matchB = 0;
      for (int j = 0; j < m; j++) {
        if (i % 2 == 0) {
          if (j % 2 == 0) {
            if (dna[i][j] == c1) matchA++;
            if (dna[i][j] == c2) matchB++;
          } else {
            if (dna[i][j] == c2) matchA++;
            if (dna[i][j] == c1) matchB++;
          }
        } else {
          if (j % 2 == 0) {
            if (dna[i][j] == c3) matchA++;
            if (dna[i][j] == c4) matchB++;
          } else {
            if (dna[i][j] == c4) matchA++;
            if (dna[i][j] == c3) matchB++;
          }
        }
      }
      scoreRow += max(matchA, matchB);
    }
    int scoreCol = 0;
    for (int j = 0; j < m; j++) {
      int matchA = 0;
      int matchB = 0;
      for (int i = 0; i < n; i++) {
        if (j % 2 == 0) {
          if (i % 2 == 0) {
            if (dna[i][j] == c1) matchA++;
            if (dna[i][j] == c2) matchB++;
          } else {
            if (dna[i][j] == c2) matchA++;
            if (dna[i][j] == c1) matchB++;
          }
        } else {
          if (i % 2 == 0) {
            if (dna[i][j] == c3) matchA++;
            if (dna[i][j] == c4) matchB++;
          } else {
            if (dna[i][j] == c4) matchA++;
            if (dna[i][j] == c3) matchB++;
          }
        }
      }
      scoreCol += max(matchA, matchB);
    }
    if (bestScore == -1 || scoreRow > bestScore) {
      bestScore = scoreRow;
      bestPair = k;
      rowBetter = true;
    }
    if (bestScore == -1 || scoreCol > bestScore) {
      bestScore = scoreCol;
      bestPair = k;
      rowBetter = false;
    }
  }
  char ans[n][m];
  char c1 = c[bestPair][0];
  char c2 = c[bestPair][1];
  char c3 = c[bestPair][2];
  char c4 = c[bestPair][3];
  if (rowBetter) {
    for (int i = 0; i < n; i++) {
      int matchA = 0;
      int matchB = 0;
      for (int j = 0; j < m; j++) {
        if (i % 2 == 0) {
          if (j % 2 == 0) {
            if (dna[i][j] == c1) matchA++;
            if (dna[i][j] == c2) matchB++;
          } else {
            if (dna[i][j] == c2) matchA++;
            if (dna[i][j] == c1) matchB++;
          }
        } else {
          if (j % 2 == 0) {
            if (dna[i][j] == c3) matchA++;
            if (dna[i][j] == c4) matchB++;
          } else {
            if (dna[i][j] == c4) matchA++;
            if (dna[i][j] == c3) matchB++;
          }
        }
      }
      for (int j = 0; j < m; j++) {
        if (i % 2 == 0) {
          if (j % 2 == 0) {
            if (matchA > matchB)
              ans[i][j] = c1;
            else
              ans[i][j] = c2;
          } else {
            if (matchA > matchB)
              ans[i][j] = c2;
            else
              ans[i][j] = c1;
          }
        } else {
          if (j % 2 == 0) {
            if (matchA > matchB)
              ans[i][j] = c3;
            else
              ans[i][j] = c4;
          } else {
            if (matchA > matchB)
              ans[i][j] = c4;
            else
              ans[i][j] = c3;
          }
        }
      }
    }
  } else {
    for (int j = 0; j < m; j++) {
      int matchA = 0;
      int matchB = 0;
      for (int i = 0; i < n; i++) {
        if (j % 2 == 0) {
          if (i % 2 == 0) {
            if (dna[i][j] == c1) matchA++;
            if (dna[i][j] == c2) matchB++;
          } else {
            if (dna[i][j] == c2) matchA++;
            if (dna[i][j] == c1) matchB++;
          }
        } else {
          if (i % 2 == 0) {
            if (dna[i][j] == c3) matchA++;
            if (dna[i][j] == c4) matchB++;
          } else {
            if (dna[i][j] == c4) matchA++;
            if (dna[i][j] == c3) matchB++;
          }
        }
      }
      for (int i = 0; i < n; i++) {
        if (j % 2 == 0) {
          if (i % 2 == 0) {
            if (matchA > matchB)
              ans[i][j] = c1;
            else
              ans[i][j] = c2;
          } else {
            if (matchA > matchB)
              ans[i][j] = c2;
            else
              ans[i][j] = c1;
          }
        } else {
          if (i % 2 == 0) {
            if (matchA > matchB)
              ans[i][j] = c3;
            else
              ans[i][j] = c4;
          } else {
            if (matchA > matchB)
              ans[i][j] = c4;
            else
              ans[i][j] = c3;
          }
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cout << ans[i][j];
    }
    cout << endl;
  }
}
