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;
char ss[300005];
vector<char> s[300005];
vector<pair<char, char> > w = {{'A', 'T'}, {'A', 'C'}, {'A', 'G'},
                               {'T', 'C'}, {'T', 'G'}, {'C', 'G'}};
vector<pair<char, char> > rw = {{'C', 'G'}, {'T', 'G'}, {'C', 'T'},
                                {'A', 'G'}, {'A', 'C'}, {'T', 'A'}};
int co[300005];
int main() {
  scanf("%d%d", &(n), &(m));
  ;
  for (int i = (0); i < (n); ++i) {
    scanf("%s", ss);
    for (int j = (0); j < (m); ++j) s[i].push_back(ss[j]);
  }
  int best = 0;
  int czyW = 1;
  int xxx = 0;
  for (int ii = (0); ii < (6); ++ii) {
    int ile = 0;
    for (int i = (0); i < (n); ++i) {
      char L1 = w[ii].first, L2 = w[ii].second;
      if (i % 2 == 1) {
        L1 = rw[ii].first, L2 = rw[ii].second;
      }
      int x[2];
      x[0] = x[1] = 0;
      for (int j = (0); j < (m); ++j) {
        if (s[i][j] == L1) x[j % 2]++;
        if (s[i][j] == L2) x[1 - (j % 2)]++;
      }
      ile += max(x[0], x[1]);
    }
    if (ile > best) {
      best = ile;
      xxx = ii;
    }
  }
  for (int ii = (0); ii < (6); ++ii) {
    int ile = 0;
    for (int i = (0); i < (m); ++i) {
      char L1 = w[ii].first, L2 = w[ii].second;
      if (i % 2 == 1) {
        L1 = rw[ii].first, L2 = rw[ii].second;
      }
      int x[2];
      x[0] = x[1] = 0;
      for (int j = (0); j < (n); ++j) {
        if (s[j][i] == L1) x[j % 2]++;
        if (s[j][i] == L2) x[1 - (j % 2)]++;
      }
      ile += max(x[0], x[1]);
    }
    if (ile > best) {
      best = ile;
      xxx = ii;
      czyW = 0;
    }
  }
  if (czyW == 1) {
    int ii = xxx;
    for (int i = (0); i < (n); ++i) {
      char L1 = w[ii].first, L2 = w[ii].second;
      if (i % 2 == 1) {
        L1 = rw[ii].first, L2 = rw[ii].second;
      }
      int x[2];
      x[0] = x[1] = 0;
      for (int j = (0); j < (m); ++j) {
        if (s[i][j] == L1) x[j % 2]++;
        if (s[i][j] == L2) x[1 - (j % 2)]++;
      }
      if (x[0] >= x[1]) {
        for (int j = (0); j < (m); ++j) {
          if (j % 2)
            s[i][j] = L2;
          else
            s[i][j] = L1;
        }
      } else {
        for (int j = (0); j < (m); ++j) {
          if (j % 2)
            s[i][j] = L1;
          else
            s[i][j] = L2;
        }
      }
    }
  } else {
    int ii = xxx;
    for (int i = (0); i < (m); ++i) {
      char L1 = w[ii].first, L2 = w[ii].second;
      if (i % 2 == 1) {
        L1 = rw[ii].first, L2 = rw[ii].second;
      }
      int x[2];
      x[0] = x[1] = 0;
      for (int j = (0); j < (n); ++j) {
        if (s[j][i] == L1) x[j % 2]++;
        if (s[j][i] == L2) x[1 - (j % 2)]++;
      }
      if (x[0] >= x[1]) {
        for (int j = (0); j < (n); ++j) {
          if (j % 2)
            s[j][i] = L2;
          else
            s[j][i] = L1;
        }
      } else {
        for (int j = (0); j < (n); ++j) {
          if (j % 2)
            s[j][i] = L1;
          else
            s[j][i] = L2;
        }
      }
    }
  }
  for (int i = (0); i < (n); ++i) {
    for (int j = (0); j < (m); ++j) {
      putchar(s[i][j]);
    }
    putchar('\n');
  }
}
