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.*;
import java.math.*;

public class Main implements Runnable {
    public InputReader in;
    public PrintWriter out;

    private static int BLUE = 0;
    private static int GREEN = 1;
    private static int RED = 2;

    private boolean[] colors = new boolean[3];

    private int[] map = new int[3];

    private int N;

    public void solve() throws Exception {
        // solution goes here
        N = in.nextInt();
        for (int i = 0; i < N; i++) {
            char c = in.nextChar();
            if (c == 'B')
                map[BLUE]++;
            else if (c == 'G')
                map[GREEN]++;
            else if (c == 'R')
                map[RED]++;
        }

        if (map[RED] == 0 && map[GREEN] == 0) {
            colors[BLUE] = true;
        } else if (map[BLUE] == 0 && map[GREEN] == 0) {
            colors[RED] = true;
        } else if (map[BLUE] == 0 && map[RED] == 0) {
            colors[GREEN] = true;
        } else if (map[RED] + map[GREEN] + map[BLUE] == 2) {
            if (map[RED] == 0)
                colors[RED] = true;
            else if (map[GREEN] == 0)
                colors[GREEN] = true;
            else
                colors[BLUE] = true;
        } else if (map[RED] + map[GREEN] + map[BLUE] == 3) {
            if (map[RED] > 0 && map[GREEN] > 0 && map[BLUE] > 0) {
                for (int i = 0; i < 3; i++) {
                    colors[i] = true;
                }
            } else {
                for (int i = 0; i < 3; i++) {
                    if (map[i] < 2)
                        colors[i] = true;
                }
            }
        } else if (oneZero() && oneOne()) {
            for (int i = 0; i < 3; i++) {
                if (map[i] < 2)
                    colors[i] = true;
            }
        } else {
            colors[0] = colors[1] = colors[2] = true;
        }

//        colors[0] = colors[1] = colors[2] = false;
//        recursiveBruteforce();

        if (colors[BLUE])
            out.print('B');
        if (colors[GREEN])
            out.print('G');
        if (colors[RED])
            out.print('R');
        out.write('\n');
        out.flush();
    }

    private boolean oneOne() {
        return map[RED] == 1 || map[GREEN] == 1 || map[BLUE] == 1;
    }

    private boolean oneZero() {
        return map[RED] == 0 || map[GREEN] == 0 || map[BLUE] == 0;
    }

    private void recursiveBruteforce() {
        if (map[RED] + map[GREEN] + map[BLUE] == 1) {
            if (map[RED] > 0)
                colors[RED] = true;
            else if (map[GREEN] > 0)
                colors[GREEN] = true;
            else if (map[BLUE] > 0)
                colors[BLUE] = true;
        } else {
            for (int i = 0; i < 3; i++) {
                if (map[i] > 1) {
                    map[i]--;
                    recursiveBruteforce();
                    map[i]++;
                }
            }
            if (map[RED] > 0 && map[GREEN] > 0) {
                map[RED]--; map[GREEN]--; map[BLUE]++;
                recursiveBruteforce();
                map[RED]++; map[GREEN]++; map[BLUE]--;
            }
            if (map[RED] > 0 && map[BLUE] > 0) {
                map[RED]--; map[BLUE]--; map[GREEN]++;
                recursiveBruteforce();
                map[RED]++; map[BLUE]++; map[GREEN]--;
            }
            if (map[GREEN] > 0 && map[BLUE] > 0) {
                map[GREEN]--; map[BLUE]--; map[RED]++;
                recursiveBruteforce();
                map[GREEN]++; map[BLUE]++; map[RED]--;
            }
        }
    }

    public void run() {
        try {
            in = new InputReader(System.in);
            out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
            Locale.setDefault(Locale.US);
            int tests = 1;
            while (tests-- > 0) {
                solve();
            }
            out.close();
        } catch (Throwable e) {
            e.printStackTrace();
            System.exit(7);
        }
    }

    static int abs(int x) {
        return x < 0 ? -x : x;
    }

    static int max(int a, int b) {
        return a > b ? a : b;
    }

    static int min(int a, int b) {
        return a < b ? a : b;
    }

    static long abs(long x) {
        return x < 0 ? -x : x;
    }

    static long max(long a, long b) {
        return a > b ? a : b;
    }

    static long min(long a, long b) {
        return a < b ? a : b;
    }

    public static void main(String args[]) {
        new Thread(null, new Main(), "Main", 1 << 28).start();
    }

    static boolean OJ = System.getProperty("ONLINE_JUDGE") != null;

    public void console(Object... objects) {
        if (!OJ) {
            out.println(Arrays.deepToString(objects));
            out.flush();
        }
    }

    @SuppressWarnings({"Duplicates", "unused"})
    static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[2048];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader() {
            this.stream = System.in;
        }

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

        public InputReader(SpaceCharFilter filter) {
            this.stream = System.in;
            this.filter = filter;
        }

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

        public int read() {
            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 char nextChar() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            return (char) c;
        }

        public int nextDigit() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            return c - '0';
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            boolean negative = false;
            if (c == '-') {
                negative = true;
                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 negative ? -res : res;
        }

        public int[] nextInts(int N) {
            int[] nums = new int[N];
            for (int i = 0; i < N; i++)
                nums[i] = nextInt();
            return nums;
        }

        public long[] nextLongs(int N) {
            long[] nums = new long[N];
            for (int i = 0; i < N; i++)
                nums[i] = nextLong();
            return nums;
        }

        public int nextUnsignedInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res;
        }

        public final long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            boolean negative = false;
            if (c == '-') {
                negative = true;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return negative ? -res : res;
        }

        public final long nextUnsignedLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res;
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            long sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!(c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1 || c == '.'));

            if (c != '.') {
                return res * sgn;
            }
            c = read();

            long aft = 0;
            int len = 1;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                aft *= 10;
                len *= 10;
                aft += c - '0';
                c = read();
            } while (!isSpaceChar(c));

            return res * sgn + aft / (1.0 * len);
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public boolean isEndChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

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

        public char[] nextChars() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));

            char[] chars = new char[res.length()];
            res.getChars(0, chars.length, chars, 0);
            return chars;
        }

        public int[][] nextIntMatrix(int rows, int cols) {
            int[][] matrix = new int[rows][cols];
            for (int i = 0; i < rows; i++)
                for (int j = 0; j < cols; j++)
                    matrix[i][j] = nextInt();
            return matrix;
        }

        public long[][] nextLongMatrix(int rows, int cols) {
            long[][] matrix = new long[rows][cols];
            for (int i = 0; i < rows; i++)
                for (int j = 0; j < cols; j++)
                    matrix[i][j] = nextLong();
            return matrix;
        }

        public char[][] nextCharMap(int rows, int cols) {
            char[][] matrix = new char[rows][cols];
            for (int i = 0; i < rows; i++)
                for (int j = 0; j < cols; j++)
                    matrix[i][j] = nextChar();
            return matrix;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}