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 main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m;
  cin >> n >> m;
  char table[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> table[i][j];
    }
  }
  char s[6][4] = {{'A', 'C', 'G', 'T'}, {'G', 'T', 'A', 'C'},
                  {'A', 'G', 'C', 'T'}, {'T', 'C', 'G', 'A'},
                  {'A', 'T', 'G', 'C'}, {'G', 'C', 'A', 'T'}};
  char best[n][m];
  int mmin = 3e5 + 5;
  for (int t = 0; t < 6; t++) {
    int cur = 0;
    char temp[n][m];
    for (int i = 0; i < n; i++) {
      int shift = (i % 2) * 2;
      int first = 0;
      int second = 0;
      for (int j = 0; j < m; j++) {
        if (s[t][(j % 2) + shift] != table[i][j]) first++;
        if (s[t][((j + 1) % 2) + shift] != table[i][j]) second++;
      }
      int x = 0;
      if (second < first) x = 1;
      for (int j = 0; j < m; j++) {
        temp[i][j] = s[t][((j + x) % 2) + shift];
      }
      cur += min(first, second);
    }
    if (cur < mmin) {
      mmin = cur;
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
          best[i][j] = temp[i][j];
        }
      }
    }
    cur = 0;
    temp[n][m];
    for (int i = 0; i < m; i++) {
      int shift = (i % 2) * 2;
      int first = 0;
      int second = 0;
      for (int j = 0; j < n; j++) {
        if (s[t][(j % 2) + shift] != table[j][i]) first++;
        if (s[t][((j + 1) % 2) + shift] != table[j][i]) second++;
      }
      int x = 0;
      if (second < first) x = 1;
      for (int j = 0; j < n; j++) {
        temp[j][i] = s[t][((j + x) % 2) + shift];
      }
      cur += min(first, second);
    }
    if (cur < mmin) {
      mmin = cur;
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
          best[i][j] = temp[i][j];
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      string t(1, best[i][j]);
      cout << t;
    }
    cout << "\n";
  }
  return 0;
}
