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 long long int N = 1e5 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m;
  cin >> n >> m;
  string a;
  string s[n];
  for (long long int i = 0; i < n; ++i) {
    cin >> s[i];
  }
  a += 'A';
  a += 'C';
  a += 'G';
  a += 'T';
  long long int mn = N * N;
  string f[n];
  for (long long int i = 0; i < 24; ++i) {
    long long int ans = 0;
    string tp[n];
    for (long long int j = 0; j < n; ++j) {
      for (long long int k = 0; k < m; ++k) {
        tp[j] += 'a';
      }
    }
    for (long long int j = 0; j < m; ++j) {
      long long int c1 = 0, c2 = 0;
      string tp1, tp2;
      for (long long int k = 0; k < n; ++k) {
        if (j % 2 == 0) {
          if (k % 2 == 0) {
            tp1 += a[0];
            tp2 += a[2];
            if (s[k][j] != a[0]) c1++;
            if (s[k][j] != a[2]) c2++;
          } else {
            tp1 += a[2];
            tp2 += a[0];
            if (s[k][j] != a[2]) c1++;
            if (s[k][j] != a[0]) c2++;
          }
        } else {
          if (k % 2 == 0) {
            tp1 += a[1];
            tp2 += a[3];
            if (s[k][j] != a[1]) c1++;
            if (s[k][j] != a[3]) c2++;
          } else {
            tp1 += a[3];
            tp2 += a[1];
            if (s[k][j] != a[3]) c1++;
            if (s[k][j] != a[1]) c2++;
          }
        }
      }
      if (c1 < c2) {
        for (long long int k = 0; k < n; ++k) {
          tp[k][j] = tp1[k];
        }
      } else {
        for (long long int k = 0; k < n; ++k) {
          tp[k][j] = tp2[k];
        }
      }
      ans += min(c1, c2);
    }
    if (ans < mn) {
      for (long long int j = 0; j < n; ++j) f[j] = tp[j];
    }
    mn = min(ans, mn);
    next_permutation(a.begin(), a.end());
  }
  for (long long int i = 0; i < 24; ++i) {
    long long int ans = 0;
    string tp[n];
    for (long long int j = 0; j < n; ++j) {
      long long int c1 = 0, c2 = 0;
      string tp1, tp2;
      for (long long int k = 0; k < m; ++k) {
        if (j % 2 == 0) {
          if (k % 2 == 0) {
            tp1 += a[0];
            tp2 += a[1];
            if (s[j][k] != a[0]) c1++;
            if (s[j][k] != a[1]) c2++;
          } else {
            tp1 += a[1];
            tp2 += a[0];
            if (s[j][k] != a[1]) c1++;
            if (s[j][k] != a[0]) c2++;
          }
        } else {
          if (k % 2 == 0) {
            tp1 += a[2];
            tp2 += a[3];
            if (s[j][k] != a[2]) c1++;
            if (s[j][k] != a[3]) c2++;
          } else {
            tp1 += a[3];
            tp2 += a[2];
            if (s[j][k] != a[3]) c1++;
            if (s[j][k] != a[2]) c2++;
          }
        }
      }
      if (c1 < c2) {
        tp[j] = tp1;
      } else {
        tp[j] = tp2;
      }
      ans += min(c1, c2);
    }
    if (ans < mn) {
      for (long long int j = 0; j < n; ++j) {
        f[j] = tp[j];
      }
    }
    mn = min(ans, mn);
    next_permutation(a.begin(), a.end());
  }
  for (long long int i = 0; i < n; ++i) {
    cout << f[i] << "\n";
  }
  return 0;
}
