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 double PI =
    3.141592653589793238462643383279502884197169399375105820974944;
int power(int a, int b, int m = 1000000007) {
  if (b == 0) return 1;
  if (b == 1) return a;
  int x = power(a, b / 2, m) % m;
  x = (x * x) % m;
  if (b % 2) return (x * a) % m;
  return x;
}
signed main() {
  int n, m;
  int perm[4] = {0, 1, 2, 3};
  cin >> n >> m;
  int a[n + 5][m + 5], b[n + 5][m + 5], c[n + 5][m + 5];
  int ans = n * m + 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      char c;
      cin >> c;
      if (c == 'A')
        a[i][j] = 0;
      else if (c == 'G')
        a[i][j] = 1;
      else if (c == 'C')
        a[i][j] = 2;
      else
        a[i][j] = 3;
    }
  }
  int cnt;
  for (int subtopewdszzzz = 0; subtopewdszzzz < 24; subtopewdszzzz++) {
    cnt = 0;
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0) {
        int lol1 = 0, lol2 = 0;
        for (int j = 0; j < m; j++) {
          if (a[i][j] != perm[j % 2]) lol1++;
          if (a[i][j] != perm[(j + 1) % 2]) lol2++;
        }
        if (lol1 < lol2) {
          cnt += lol1;
          for (int j = 0; j < m; j++) {
            b[i][j] = perm[j % 2];
          }
        } else {
          cnt += lol2;
          for (int j = 0; j < m; j++) {
            b[i][j] = perm[(j + 1) % 2];
          }
        }
      } else {
        int lol1 = 0, lol2 = 0;
        for (int j = 0; j < m; j++) {
          if (a[i][j] != perm[2 + (j % 2)]) lol1++;
          if (a[i][j] != perm[2 + ((j + 1) % 2)]) lol2++;
        }
        if (lol1 < lol2) {
          cnt += lol1;
          for (int j = 0; j < m; j++) {
            b[i][j] = perm[2 + (j % 2)];
          }
        } else {
          cnt += lol2;
          for (int j = 0; j < m; j++) {
            b[i][j] = perm[2 + ((j + 1) % 2)];
          }
        }
      }
    }
    if (cnt < ans) {
      ans = cnt;
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
          c[i][j] = b[i][j];
        }
      }
    }
    cnt = 0;
    for (int j = 0; j < m; j++) {
      if (j % 2 == 0) {
        int lol1 = 0, lol2 = 0;
        for (int i = 0; i < n; i++) {
          if (a[i][j] != perm[i % 2]) lol1++;
          if (a[i][j] != perm[(i + 1) % 2]) lol2++;
        }
        if (lol1 < lol2) {
          cnt += lol1;
          for (int i = 0; i < n; i++) {
            b[i][j] = perm[i % 2];
          }
        } else {
          cnt += lol2;
          for (int i = 0; i < n; i++) {
            b[i][j] = perm[(i + 1) % 2];
          }
        }
      } else {
        int lol1 = 0, lol2 = 0;
        for (int i = 0; i < n; i++) {
          if (a[i][j] != perm[2 + (i % 2)]) lol1++;
          if (a[i][j] != perm[2 + ((i + 1) % 2)]) lol2++;
        }
        if (lol1 < lol2) {
          cnt += lol1;
          for (int i = 0; i < n; i++) {
            b[i][j] = perm[2 + (i % 2)];
          }
        } else {
          cnt += lol2;
          for (int i = 0; i < n; i++) {
            b[i][j] = perm[2 + ((i + 1) % 2)];
          }
        }
      }
    }
    if (cnt < ans) {
      ans = cnt;
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
          c[i][j] = b[i][j];
        }
      }
    }
    next_permutation(perm, perm + 4);
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (c[i][j] == 0)
        cout << "A";
      else if (c[i][j] == 1)
        cout << "G";
      else if (c[i][j] == 2)
        cout << "C";
      else
        cout << "T";
    }
    cout << "\n";
  }
}
