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.
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.NoSuchElementException;
import java.io.InputStream;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        BNiceTable solver = new BNiceTable();
        solver.solve(1, in, out);
        out.close();
    }

    static class BNiceTable {
        final static String converter = "AGCT";

        int delta(int[] order, int[] b) {
            int res = 0;
            for (int i = 0; i < b.length; i++) {
                if (b[i] != order[i % 2]) res++;
            }
            return res;
        }

        int delta(int[] order, int[][] tab, int colIndex) {
            int res = 0;
            for (int i = 0; i < tab.length; i++) {
                if (tab[i][colIndex] != order[i % 2]) res++;
            }
            return res;
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int rows = in.readInt();
            int cols = in.readInt();
            int[][] tab = new int[rows][cols];
            for (int row = 0; row < tab.length; row++) {
                String s = in.next();
                for (int col = 0; col < s.length(); col++) {
                    tab[row][col] = converter.indexOf(s.charAt(col));
                    if (tab[row][col] == -1) {
                        throw new RuntimeException();
                    }
                }
            }
            int res = Integer.MAX_VALUE;
            int[][] resTable = new int[rows][cols];
            for (int firstRowA = 0; firstRowA < 4; firstRowA++) {
                for (int firstRowB = firstRowA + 1; firstRowB < 4; firstRowB++) {
                    boolean[] firstRow = new boolean[4];
                    firstRow[firstRowA] = true;
                    firstRow[firstRowB] = true;
                    boolean[] secondRow = new boolean[4];
                    for (int i = 0; i < secondRow.length; i++) {
                        if (!firstRow[i]) {
                            secondRow[i] = true;
                        }
                    }
                    int[] first = new int[2];
                    {
                        int firstPtr = 0;
                        for (int i = 0; i < firstRow.length; i++) {
                            if (firstRow[i]) {
                                first[firstPtr++] = i;
                            }
                        }
                    }
                    int[] second = new int[2];
                    {
                        int secondPtr = 0;
                        for (int i = 0; i < secondRow.length; i++) {
                            if (secondRow[i]) {
                                second[secondPtr++] = i;
                            }
                        }
                    }
                    Arrays.sort(first);
                    Arrays.sort(second);
                    int temp = 0;
                    for (int row = 0; row < rows; row++) {
                        int[] toConsider = row % 2 == 0 ? first : second;
                        int same = delta(toConsider, tab[row]);
                        ArrayUtils.reverse(toConsider);
                        int other = delta(toConsider, tab[row]);
                        temp += Math.min(same, other);
                    }
                    if (temp < res) {
                        res = temp;
                        for (int row = 0; row < rows; row++) {
                            int[] toConsider = row % 2 == 0 ? first : second;
                            int same = delta(toConsider, tab[row]);
                            ArrayUtils.reverse(toConsider);
                            int other = delta(toConsider, tab[row]);
                            if (same < other) {
                                ArrayUtils.reverse(toConsider);
                            }
                            for (int col = 0; col < cols; col++) {
                                resTable[row][col] = toConsider[col % 2];
                            }
                        }
                    }
                }
            }
            for (int firstColA = 0; firstColA < 4; firstColA++) {
                for (int firstColB = firstColA + 1; firstColB < 4; firstColB++) {
                    boolean[] firstCol = new boolean[4];
                    firstCol[firstColA] = true;
                    firstCol[firstColB] = true;
                    boolean[] secondCol = new boolean[4];
                    for (int i = 0; i < secondCol.length; i++) {
                        if (!firstCol[i]) {
                            secondCol[i] = true;
                        }
                    }
                    int[] first = new int[2];
                    {
                        int firstPtr = 0;
                        for (int i = 0; i < firstCol.length; i++) {
                            if (firstCol[i]) {
                                first[firstPtr++] = i;
                            }
                        }
                    }
                    int[] second = new int[2];
                    {
                        int secondPtr = 0;
                        for (int i = 0; i < secondCol.length; i++) {
                            if (secondCol[i]) {
                                second[secondPtr++] = i;
                            }
                        }
                    }
                    Arrays.sort(first);
                    Arrays.sort(second);
                    int temp = 0;
                    for (int col = 0; col < cols; col++) {
                        int[] toConsider = col % 2 == 0 ? first : second;
                        int same = delta(toConsider, tab, col);
                        ArrayUtils.reverse(toConsider);
                        int other = delta(toConsider, tab, col);
                        temp += Math.min(same, other);
                    }
                    if (temp < res) {
                        res = temp;
                        for (int col = 0; col < cols; col++) {
                            int[] toConsider = col % 2 == 0 ? first : second;
                            int same = delta(toConsider, tab, col);
                            ArrayUtils.reverse(toConsider);
                            int other = delta(toConsider, tab, col);
                            if (same < other) {
                                ArrayUtils.reverse(toConsider);
                            }
                            for (int row = 0; row < rows; row++) {
                                resTable[row][col] = toConsider[row % 2];
                            }
                        }
                    }
                }
            }
            for (int[] t : resTable) {
                for (int i = 0; i < t.length; i++) {
                    out.print(converter.charAt(t[i]));
                }
                out.printLine();
            }
        }
    }
    static interface IntIterator {
        public int value() throws NoSuchElementException;
        public boolean advance();
        public boolean isValid();
    }
    static interface IntList extends IntReversableCollection {
        public abstract int get(int index);
        public abstract void set(int index, int value);
        public abstract void removeAt(int index);
        default public void swap(int first, int second) {
            if (first == second) {
                return;
            }
            int temp = get(first);
            set(first, get(second));
            set(second, temp);
        }
        default public IntIterator intIterator() {
            return new IntIterator() {
                private int at;
                private boolean removed;

                public int value() {
                    if (removed) {
                        throw new IllegalStateException();
                    }
                    return get(at);
                }

                public boolean advance() {
                    at++;
                    removed = false;
                    return isValid();
                }

                public boolean isValid() {
                    return !removed && at < size();
                }

                public void remove() {
                    removeAt(at);
                    at--;
                    removed = true;
                }
            };
        }
        default public void inPlaceReverse() {
            for (int i = 0, j = size() - 1; i < j; i++, j--) {
                swap(i, j);
            }
        }
    }
    static abstract class IntAbstractStream implements IntStream {
        public String toString() {
            StringBuilder builder = new StringBuilder();
            boolean first = true;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                if (first) {
                    first = false;
                } else {
                    builder.append(' ');
                }
                builder.append(it.value());
            }
            return builder.toString();
        }

        public boolean equals(Object o) {
            if (!(o instanceof IntStream)) {
                return false;
            }
            IntStream c = (IntStream) o;
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                if (it.value() != jt.value()) {
                    return false;
                }
                it.advance();
                jt.advance();
            }
            return !it.isValid() && !jt.isValid();
        }

        public int hashCode() {
            int result = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                result *= 31;
                result += it.value();
            }
            return result;
        }
    }
    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void printLine() {
            writer.println();
        }

        public void print(char i) {
            writer.print(i);
        }

        public void close() {
            writer.close();
        }
    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    static class ArrayUtils {
        public static void reverse(int[] array) {
            new IntArray(array).inPlaceReverse();
        }
    }
    static interface IntStream extends Iterable<Integer>, Comparable<IntStream> {
        public IntIterator intIterator();
        default public Iterator<Integer> iterator() {
            return new Iterator<Integer>() {
                private IntIterator it = intIterator();

                public boolean hasNext() {
                    return it.isValid();
                }

                public Integer next() {
                    int result = it.value();
                    it.advance();
                    return result;
                }
            };
        }
        default public int compareTo(IntStream c) {
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                int i = it.value();
                int j = jt.value();
                if (i < j) {
                    return -1;
                } else if (i > j) {
                    return 1;
                }
                it.advance();
                jt.advance();
            }
            if (it.isValid()) {
                return 1;
            }
            if (jt.isValid()) {
                return -1;
            }
            return 0;
        }
    }
    static class IntArray extends IntAbstractStream implements IntList {
        private int[] data;

        public IntArray(int[] arr) {
            data = arr;
        }

        public int size() {
            return data.length;
        }

        public int get(int at) {
            return data[at];
        }

        public void removeAt(int index) {
            throw new UnsupportedOperationException();
        }

        public void set(int index, int value) {
            data[index] = value;
        }
    }
    static interface IntReversableCollection extends IntCollection {
    }
    static interface IntCollection extends IntStream {
        public int size();
    }
}

