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.
/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
If I'm the sun, you're the moon
Because when I go up, you go down
*******************************
I'm working for the day I will surpass you
https://www.a2oj.com/Ladder16.html
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class x1099E
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int M = Integer.parseInt(st.nextToken());
         char[][] grid = new char[N][M];
         for(int i=0; i < N; i++)
            grid[i] = infile.readLine().toCharArray();
         char[][] res = new char[N][M];
         recur1(grid,'A','T',res);
         char[][] temp = new char[N][M];
         recur1(grid,'A','G',temp);
         if(val(grid,res) > val(grid,temp))
            for(int i=0; i < N; i++)
               for(int a=0; a < M; a++)
                  res[i][a] = temp[i][a];
         temp = new char[N][M];
         recur1(grid,'A','C',temp);
         if(val(grid,res) > val(grid,temp))
            for(int i=0; i < N; i++)
               for(int a=0; a < M; a++)
                  res[i][a] = temp[i][a];
         temp = new char[N][M];
         recur1(grid,'T','G',temp);
         if(val(grid,res) > val(grid,temp))
            for(int i=0; i < N; i++)
               for(int a=0; a < M; a++)
                  res[i][a] = temp[i][a];
         temp = new char[N][M];
         recur1(grid,'C','G',temp);
         if(val(grid,res) > val(grid,temp))
            for(int i=0; i < N; i++)
               for(int a=0; a < M; a++)
                  res[i][a] = temp[i][a];
         temp = new char[N][M];
         recur1(grid,'C','T',temp);
         if(val(grid,res) > val(grid,temp))
            for(int i=0; i < N; i++)
               for(int a=0; a < M; a++)
                  res[i][a] = temp[i][a];
         //this is cancer
         char[][] res2 = new char[N][M];
         recur2(grid,'A','T',res2);
         temp = new char[N][M];
         recur2(grid,'A','G',temp);
         if(val(grid,res2) > val(grid,temp))
            for(int i=0; i < N; i++)
               for(int a=0; a < M; a++)
                  res2[i][a] = temp[i][a];
         temp = new char[N][M];
         recur2(grid,'A','C',temp);
         if(val(grid,res2) > val(grid,temp))
            for(int i=0; i < N; i++)
               for(int a=0; a < M; a++)
                  res2[i][a] = temp[i][a];
         temp = new char[N][M];
         recur2(grid,'T','G',temp);
         if(val(grid,res2) > val(grid,temp))
            for(int i=0; i < N; i++)
               for(int a=0; a < M; a++)
                  res2[i][a] = temp[i][a];
         temp = new char[N][M];
         recur2(grid,'C','G',temp);
         if(val(grid,res2) > val(grid,temp))
            for(int i=0; i < N; i++)
               for(int a=0; a < M; a++)
                  res2[i][a] = temp[i][a];
         temp = new char[N][M];
         recur2(grid,'C','T',temp);
         if(val(grid,res2) > val(grid,temp))
            for(int i=0; i < N; i++)
               for(int a=0; a < M; a++)
                  res2[i][a] = temp[i][a];
         if(val(grid,res) > val(grid,res2))
            for(int i=0; i < N; i++)
               for(int a=0; a < M; a++)
                  res[i][a] = res2[i][a];
         //print
         StringBuilder sb = new StringBuilder();
         for(int r=0; r < N; r++)
         {
            for(int c=0; c < M; c++)
               sb.append(res[r][c]);
            sb.append("\n");
         }
         System.out.print(sb);
      }
      public static int val(char[][] grid, char[][] temp)
      {
         int cnt = 0;
         for(int i=0; i < grid.length; i++)
            for(int a=0; a < grid[0].length; a++)
               if(grid[i][a] != temp[i][a])
                  cnt++;
         return cnt;
      }
      public static void recur2(char[][] grid, char x, char y, char[][] temp)
      {
         for(int c=0; c < grid[0].length; c++)
         {
            int t = 0;
            for(int i=0; i < grid.length; i++)
               if(i%2==0 && grid[i][c] != x || i%2==1 && grid[i][c] != y)
                  t++;
            int z = 0;
            for(int i=0; i < grid.length; i++)
               if(i%2==0 && grid[i][c] != y || i%2==1 && grid[i][c] != x)
                  z++;
            if(t < z)
               for(int i=0; i < grid.length; i++)
               {
                  temp[i][c] = y;
                  if(i%2==0)
                     temp[i][c] = x;
               }
            else
               for(int i=0; i < grid.length; i++)
               {
                  temp[i][c] = x;
                  if(i%2==0)
                     temp[i][c] = y;
               }
            //get next
            int[] lol = new int[30];
            lol[x-'A']++;   lol[y-'A']++;
            char a = 'x';
            char b = 'x';
            if(lol['A'-'A'] == 0)
               a = 'A';
            if(lol['C'-'A'] == 0)
            {
               if(a != 'x')
                  b = 'C';
               else
                  a = 'C';
            }
            if(lol['G'-'A'] == 0)
            {
               if(a != 'x')
                  b = 'G';
               else
                  a = 'G';
            }
            if(lol['T'-'A'] == 0)
               b = 'T';
            x = a;
            y = b;
         }
      }
      public static void recur1(char[][] grid, char x, char y, char[][] temp)
      {
         for(int r=0; r < grid.length; r++)
         {
            int t = 0;
            for(int i=0; i < grid[0].length; i++)
               if(i%2==0 && grid[r][i] != x || i%2==1 && grid[r][i] != y)
                  t++;
            int z = 0;
            for(int i=0; i < grid[0].length; i++)
               if(i%2==0 && grid[r][i] != y || i%2==1 && grid[r][i] != x)
                  z++;
            if(t < z)
               for(int i=0; i < grid[r].length; i++)
               {
                  temp[r][i] = y;
                  if(i%2==0)
                     temp[r][i] = x;
               }
            else
               for(int i=0; i < grid[r].length; i++)
               {
                  temp[r][i] = x;
                  if(i%2==0)
                     temp[r][i] = y;
               }
            //get next
            int[] lol = new int[30];
            lol[x-'A']++;   lol[y-'A']++;
            char a = 'x';
            char b = 'x';
            if(lol['A'-'A'] == 0)
               a = 'A';
            if(lol['C'-'A'] == 0)
            {
               if(a != 'x')
                  b = 'C';
               else
                  a = 'C';
            }
            if(lol['G'-'A'] == 0)
            {
               if(a != 'x')
                  b = 'G';
               else
                  a = 'G';
            }
            if(lol['T'-'A'] == 0)
               b = 'T';
            x = a;
            y = b;
         }
      }
   }