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;
void solve(istream& in, ostream& out) {
  int n, m;
  in >> n >> m;
  vector<string> a(n);
  for (int i = 0; i < n; ++i) {
    in >> a[i];
  }
  string S = "AGCT";
  int best = numeric_limits<int>::max();
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < i; ++j) {
      for (int k = 0; k < 4; ++k) {
        for (int p = 0; p < k; ++p) {
          set<int> s = {i, j, k, p};
          if (s.size() < 4) continue;
          int cur = 0;
          for (int r = 0; r < n; ++r) {
            char ch[2];
            if (r % 2 == 0) {
              ch[0] = S[i];
              ch[1] = S[j];
            } else {
              ch[0] = S[k];
              ch[1] = S[p];
            }
            int cost1 = 0;
            for (int c = 0; c < m; ++c) {
              cost1 += a[r][c] != ch[c % 2];
            }
            int cost2 = 0;
            for (int c = 0; c < m; ++c) {
              cost2 += a[r][c] != ch[(c + 1) % 2];
            }
            cur += min(cost1, cost2);
          }
          best = min(best, cur);
        }
      }
    }
  }
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < i; ++j) {
      for (int k = 0; k < 4; ++k) {
        for (int p = 0; p < k; ++p) {
          set<int> s = {i, j, k, p};
          if (s.size() < 4) continue;
          int cur = 0;
          for (int c = 0; c < m; ++c) {
            char ch[2];
            if (c % 2 == 0) {
              ch[0] = S[i];
              ch[1] = S[j];
            } else {
              ch[0] = S[k];
              ch[1] = S[p];
            }
            int cost1 = 0;
            for (int r = 0; r < n; ++r) {
              cost1 += a[r][c] != ch[r % 2];
            }
            int cost2 = 0;
            for (int r = 0; r < n; ++r) {
              cost2 += a[r][c] != ch[(r + 1) % 2];
            }
            cur += min(cost1, cost2);
          }
          best = min(best, cur);
        }
      }
    }
  }
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < i; ++j) {
      for (int k = 0; k < 4; ++k) {
        for (int p = 0; p < k; ++p) {
          set<int> s = {i, j, k, p};
          if (s.size() < 4) continue;
          int cur = 0;
          for (int r = 0; r < n; ++r) {
            char ch[2];
            if (r % 2 == 0) {
              ch[0] = S[i];
              ch[1] = S[j];
            } else {
              ch[0] = S[k];
              ch[1] = S[p];
            }
            int cost1 = 0;
            for (int c = 0; c < m; ++c) {
              cost1 += a[r][c] != ch[c % 2];
            }
            int cost2 = 0;
            for (int c = 0; c < m; ++c) {
              cost2 += a[r][c] != ch[(c + 1) % 2];
            }
            cur += min(cost1, cost2);
          }
          if (cur == best) {
            for (int r = 0; r < n; ++r) {
              char ch[2];
              if (r % 2 == 0) {
                ch[0] = S[i];
                ch[1] = S[j];
              } else {
                ch[0] = S[k];
                ch[1] = S[p];
              }
              int cost1 = 0;
              for (int c = 0; c < m; ++c) {
                cost1 += a[r][c] != ch[c % 2];
              }
              int cost2 = 0;
              for (int c = 0; c < m; ++c) {
                cost2 += a[r][c] != ch[(c + 1) % 2];
              }
              for (int c = 0; c < m; ++c) {
                out << ch[(c + (cost2 < cost1)) % 2];
              }
              out << endl;
            }
            return;
          }
        }
      }
    }
  }
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < i; ++j) {
      for (int k = 0; k < 4; ++k) {
        for (int p = 0; p < k; ++p) {
          set<int> s = {i, j, k, p};
          if (s.size() < 4) continue;
          int cur = 0;
          for (int c = 0; c < m; ++c) {
            char ch[2];
            if (c % 2 == 0) {
              ch[0] = S[i];
              ch[1] = S[j];
            } else {
              ch[0] = S[k];
              ch[1] = S[p];
            }
            int cost1 = 0;
            for (int r = 0; r < n; ++r) {
              cost1 += a[r][c] != ch[r % 2];
            }
            int cost2 = 0;
            for (int r = 0; r < n; ++r) {
              cost2 += a[r][c] != ch[(r + 1) % 2];
            }
            cur += min(cost1, cost2);
          }
          if (cur == best) {
            vector<string> res(m);
            for (int c = 0; c < m; ++c) {
              char ch[2];
              if (c % 2 == 0) {
                ch[0] = S[i];
                ch[1] = S[j];
              } else {
                ch[0] = S[k];
                ch[1] = S[p];
              }
              int cost1 = 0;
              for (int r = 0; r < n; ++r) {
                cost1 += a[r][c] != ch[r % 2];
              }
              int cost2 = 0;
              for (int r = 0; r < n; ++r) {
                cost2 += a[r][c] != ch[(r + 1) % 2];
              }
              for (int r = 0; r < n; ++r) {
                res[c] += ch[(r + (cost2 < cost1)) % 2];
              }
            }
            for (int r = 0; r < n; ++r) {
              for (int c = 0; c < m; ++c) {
                out << res[c][r];
              }
              out << endl;
            }
            return;
          }
        }
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solve(in, out);
}
