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<vector<char> > t;
void read() {
  cin >> n >> m;
  t.resize(n + 1);
  for (int i = 1; i <= n; i++) {
    t[i].resize(m + 1);
    for (int j = 1; j <= m; j++) cin >> t[i][j];
  }
}
vector<vector<char> > best_t;
int best_c = INT_MAX;
void solve() {
  best_t.resize(n + 1);
  for (int i = 1; i <= n; i++) best_t.resize(m + 1);
  vector<char> p = {'A', 'C', 'G', 'T'};
  do {
    vector<vector<char> > curr_t;
    curr_t.resize(n + 1);
    for (int i = 1; i <= n; i++) curr_t[i].resize(m + 1);
    char a = p[0], b = p[1], c = p[2], d = p[3];
    int cnt_d = 0;
    curr_t[1][1] = a, curr_t[1][2] = b, curr_t[2][1] = c, curr_t[2][2] = d;
    cnt_d += (t[1][1] != a) + (t[1][2] != b) + (t[2][1] != c) + (t[2][2] != d);
    for (int j = 3; j <= m; j++) {
      if (j % 2 == 1) {
        curr_t[1][j] = a;
        cnt_d += (t[1][j] != a);
      } else {
        curr_t[1][j] = b;
        cnt_d += (t[1][j] != b);
      }
    }
    for (int j = 3; j <= m; j++) {
      if (j % 2 == 1) {
        curr_t[2][j] = c;
        cnt_d += (t[2][j] != c);
      } else {
        curr_t[2][j] = d;
        cnt_d += (t[2][j] != d);
      }
    }
    for (int i = 3; i <= n; i++) {
      int first = 0, second = 0;
      if (i % 2 == 1) {
        for (int j = 1; j <= m; j++) {
          if (j % 2 == 1) {
            first += (t[i][j] != a);
            second += (t[i][j] != b);
          } else {
            first += (t[i][j] != b);
            second += (t[i][j] != a);
          }
        }
        if (first < second) {
          cnt_d += first;
          for (int j = 1; j <= m; j++) {
            if (j % 2 == 1)
              curr_t[i][j] = a;
            else
              curr_t[i][j] = b;
          }
        } else {
          cnt_d += second;
          for (int j = 1; j <= m; j++) {
            if (j % 2 == 1)
              curr_t[i][j] = b;
            else
              curr_t[i][j] = a;
          }
        }
      } else {
        for (int j = 1; j <= m; j++) {
          if (j % 2 == 1) {
            first += (t[i][j] != c);
            second += (t[i][j] != d);
          } else {
            first += (t[i][j] != d);
            second += (t[i][j] != c);
          }
        }
        if (first < second) {
          cnt_d += first;
          for (int j = 1; j <= m; j++) {
            if (j % 2 == 1)
              curr_t[i][j] = c;
            else
              curr_t[i][j] = d;
          }
        } else {
          cnt_d += second;
          for (int j = 1; j <= m; j++) {
            if (j % 2 == 1)
              curr_t[i][j] = d;
            else
              curr_t[i][j] = c;
          }
        }
      }
    }
    if (cnt_d < best_c) best_c = cnt_d, best_t = curr_t;
    cnt_d = (t[1][1] != a) + (t[1][2] != b) + (t[2][1] != c) + (t[2][2] != d);
    for (int i = 3; i <= n; i++) {
      if (i % 2 == 1) {
        curr_t[i][1] = a;
        cnt_d += (t[i][1] != a);
      } else {
        curr_t[i][1] = c;
        cnt_d += (t[i][1] != c);
      }
    }
    for (int i = 3; i <= n; i++) {
      if (i % 2 == 1) {
        curr_t[i][2] = b;
        cnt_d += (t[i][2] != b);
      } else {
        curr_t[i][2] = d;
        cnt_d += (t[i][2] != d);
      }
    }
    for (int j = 3; j <= m; j++) {
      int first = 0, second = 0;
      if (j % 2 == 1) {
        for (int i = 1; i <= n; i++) {
          if (i % 2 == 1) {
            first += (t[i][j] != a);
            second += (t[i][j] != c);
          } else {
            first += (t[i][j] != c);
            second += (t[i][j] != a);
          }
        }
        if (first < second) {
          cnt_d += first;
          for (int i = 1; i <= n; i++) {
            if (i % 2 == 1)
              curr_t[i][j] = a;
            else
              curr_t[i][j] = c;
          }
        } else {
          cnt_d += second;
          for (int i = 1; i <= n; i++) {
            if (i % 2 == 1)
              curr_t[i][j] = c;
            else
              curr_t[i][j] = a;
          }
        }
      } else {
        for (int i = 1; i <= n; i++) {
          if (i % 2 == 1) {
            first += (t[i][j] != b);
            second += (t[i][j] != d);
          } else {
            first += (t[i][j] != d);
            second += (t[i][j] != b);
          }
        }
        if (first < second) {
          cnt_d += first;
          for (int i = 1; i <= n; i++) {
            if (i % 2 == 1)
              curr_t[i][j] = b;
            else
              curr_t[i][j] = d;
          }
        } else {
          cnt_d += second;
          for (int i = 1; i <= n; i++) {
            if (i % 2 == 1)
              curr_t[i][j] = d;
            else
              curr_t[i][j] = b;
          }
        }
      }
    }
    if (cnt_d < best_c) best_c = cnt_d, best_t = curr_t;
  } while (next_permutation(p.begin(), p.end()));
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) cout << best_t[i][j];
    cout << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  read();
  solve();
}
