Catherine has a deck of n cards, each of which is either red, green, or blue. As long as there are at least two cards left, she can do one of two actions: 

  * take any two (not necessarily adjacent) cards with different colors and exchange them for a new card of the third color; 
  * take any two (not necessarily adjacent) cards with the same color and exchange them for a new card with that color. 



She repeats this process until there is only one card left. What are the possible colors for the final card?

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 200) — the total number of cards.

The next line contains a string s of length n — the colors of the cards. s contains only the characters 'B', 'G', and 'R', representing blue, green, and red, respectively.

Output

Print a single string of up to three characters — the possible colors of the final card (using the same symbols as the input) in alphabetical order.

Examples

Input

2
RB


Output

G


Input

3
GRG


Output

BR


Input

5
BBBBB


Output

B

Note

In the first sample, Catherine has one red card and one blue card, which she must exchange for a green card.

In the second sample, Catherine has two green cards and one red card. She has two options: she can exchange the two green cards for a green card, then exchange the new green card and the red card for a blue card. Alternatively, she can exchange a green and a red card for a blue card, then exchange the blue card and remaining green card for a red card.

In the third sample, Catherine only has blue cards, so she can only exchange them for more blue cards.
import java.io.*;
import java.util.Arrays;
import java.util.InputMismatchException;

public class VCB {
    private static InputReader in = new InputReader(System.in);
    private static OutputWriter out = new OutputWriter(System.out);


    private static void solve() throws Exception {
        int n = in.readInt();
        String s = in.readString();
        int[] colors = new int[n];
        for (int i = 0; i < n; ++i) {
            if (s.charAt(i) == 'G') {
                colors[i] = 1;
            }
            if (s.charAt(i) == 'R') {
                colors[i] = 2;
            }
        }
        Arrays.sort(colors);
        int x = 0;
        int y = 0;
        int z = 0;
        int count = 0;
        for (int i = 0; i < n; ++i) {
            if (colors[i] != 0) {
                break;
            }
            count++;
        }
        x = count;
        count = 0;
        for (int i = x; i < n; ++i) {
            if (colors[i] != 1) {
                break;
            }
            count++;
        }
        y = count;
        z = n - x - y;
        if ((x != 0) && (y != 0) && (z != 0)) {
            out.println("BGR");
        } else if ((x == 0) && (y == 0)) {
                out.println("R");
            }
            else if ((z == 0) && (y == 0)) {
                out.println("B");
            }
            else if ((x == 0) && (z == 0)) {
                out.println("G");
            }
            else if (x == 0) {
                if ((y == 1) && (z == 1)) {
                    out.println("B");
                } else if (y == 1) {
                    out.println("BG");
                } else if (z == 1) {
                    out.println("BR");
                } else {
                    out.println("BGR");
                }
            }
            else if (y == 0) {
                if ((x == 1) && (z == 1)) {
                    out.println("G");
                } else if (x == 1) {
                    out.println("BG");
                } else if (z == 1) {
                    out.println("GR");
                } else {
                    out.println("BGR");
                }
            }

            else if (z == 0) {
                if ((x == 1) && (y == 1)) {
                    out.println("R");
                } else if (x == 1) {
                    out.println("BR");
                } else if (y == 1) {
                    out.println("GR");
                } else {
                    out.println("BGR");
                }
            }





    }


    public static void main(String[] args) throws Exception {
        solve();
        out.close();
    }


    private static class InputReader {
        private InputStream stream;
        private byte[] buffer;
        private int currentIndex;
        private int bytesRead;

        public InputReader(InputStream stream) {
            this.stream = stream;
            buffer = new byte[131072];
        }


        public InputReader(InputStream stream, int bufferSize) {
            this.stream = stream;
            buffer = new byte[bufferSize];
        }


        private int read() throws IOException {
            if (currentIndex >= bytesRead) {
                currentIndex = 0;
                bytesRead = stream.read(buffer);
                if (bytesRead <= 0) {
                    return -1;
                }
            }
            return buffer[currentIndex++];
        }

        public String readString() throws IOException {
            int c = read();
            while (!isPrintable(c)) {
                c = read();
            }
            StringBuilder result = new StringBuilder();
            do {
                result.appendCodePoint(c);
                c = read();
            } while (isPrintable(c));
            return result.toString();
        }

        public int readInt() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            int result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public long readLong() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            long result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public double readDouble() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            boolean fraction = false;
            double multiplier = 1;
            double result = 0;
            do {
                if ((c == 'e') || (c == 'E')) {
                    return sign * result * Math.pow(10, readInt());
                }
                if ((c < '0') || (c > '9')) {
                    if ((c == '.') && (!fraction)) {
                        fraction = true;
                        c = read();
                        continue;
                    }
                    throw new InputMismatchException();
                }
                if (fraction) {
                    multiplier /= 10;
                    result += (c - '0') * multiplier;
                    c = read();
                } else {
                    result *= 10;
                    result += (c - '0');
                    c = read();
                }
            } while (isPrintable(c));
            return sign * result;
        }

        private boolean isPrintable(int c) {
            return ((c > 32) && (c < 127));
        }
    }

    private static class OutputWriter {
        private 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 print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void flush() {
            writer.flush();
        }
    }
}