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.StringTokenizer;

/**
 * @author ayratgdl
 * @date 13.02.16
 */
public class B {
    private static IO.In in = IO.in;
    private static IO.Out out = IO.out;

    private static int[][][] A;

    static {
        A = new int[201][201][201]; // rgb
        A[1][0][0] = 1; // r
        A[0][1][0] = 2; // g
        A[0][0][1] = 4; // b
    }

    public static void main(String[] args) {
        int n = in.int1();

        int[] rgb = countRGB(in.word());

        int rgbBits = calc(rgb[0], rgb[1], rgb[2]);

        String result = "";
        if ((rgbBits & 4) != 0) result += "B";
        if ((rgbBits & 2) != 0) result += "G";
        if ((rgbBits & 1) != 0) result += "R";
        out.write(result).ln();
    }

    private static int[] countRGB(String line) {
        int r = 0, g = 0, b = 0;
        char[] chars = line.toCharArray();
        for (int i=0; i < chars.length; i++) {
            if (chars[i] == 'R') r++;
            if (chars[i] == 'G') g++;
            if (chars[i] == 'B') b++;
        }
        return new int[]{r, g, b};
    }

    public static int calc(int r, int g, int b) {
        if (A[r][g][b] != 0) return A[r][g][b];
        /*
        if (A[g][r][b] != 0) {
            int x = BO.bitOf(A[g][r][b], 0);
            int y = BO.bitOf(A[g][r][b], 1);
            int z = BO.bitOf(A[g][r][b], 2);
            long res = 0;
            res = BO.changeBit(res, 0, y);
            res = BO.changeBit(res, 1, x);
            res = BO.changeBit(res, 2, z);
            A[r][g][b] = (int)res;
            return (int)res;
        }
        if (A[b][g][r] != 0) {
            int x = BO.bitOf(A[g][r][b], 0);
            int y = BO.bitOf(A[g][r][b], 1);
            int z = BO.bitOf(A[g][r][b], 2);
            long res = 0;
            res = BO.changeBit(res, 0, z);
            res = BO.changeBit(res, 1, y);
            res = BO.changeBit(res, 2, x);
            A[r][g][b] = (int)res;
            return (int)res;
        }
        if (A[r][b][g] != 0) {
            int x = BO.bitOf(A[g][r][b], 0);
            int y = BO.bitOf(A[g][r][b], 1);
            int z = BO.bitOf(A[g][r][b], 2);
            long res = 0;
            res = BO.changeBit(res, 0, x);
            res = BO.changeBit(res, 1, z);
            res = BO.changeBit(res, 2, y);
            A[r][g][b] = (int)res;
            return (int)res;
        }
        */
        int result = 0;
        if (r > 1) result = calc(r-1, g, b);
        if (result == 7) {
            A[r][g][b] = result;
            return result;
        }
        if (g > 1) result |= calc(r, g-1, b);
        if (result == 7) {
            A[r][g][b] = result;
            return result;
        }
        if (b > 1) result |= calc(r, g, b-1);
        if (result == 7) {
            A[r][g][b] = result;
            return result;
        }
        if (r > 0 && g > 0) result |= calc(r-1, g-1, b+1);
        if (result == 7) {
            A[r][g][b] = result;
            return result;
        }
        if (r > 0 && b > 0) result |= calc(r-1, g+1, b-1);
        if (result == 7) {
            A[r][g][b] = result;
            return result;
        }
        if (g > 0 && b > 0) result |= calc(r+1, g-1, b-1);
        A[r][g][b] = result;
        return result;
    }

    public static class IO {
        public static final In in = new In(new BufferedReader(new InputStreamReader(System.in)));
        public static final Out out = new Out(new BufferedWriter(new OutputStreamWriter(System.out)));

        public static class In {
            private BufferedReader reader;
            StringTokenizer tokener;

            public In(BufferedReader reader) {
                this.reader = reader;
            }

            public String word() {
                try {
                    if (tokener == null || !tokener.hasMoreTokens())
                        tokener = new StringTokenizer(reader.readLine());
                    return tokener.nextToken();
                }
                catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }

            public int int1() {
                return Integer.parseInt(word());
            }

            public long long1() {
                return Long.parseLong(word());
            }

            public String[] words(int n) {
                String[] result = new String[n];
                for (int i = 0; i < n; i++)
                    result[i] = word();
                return result;
            }

            public int[] ints(int n) {
                int[] result = new int[n];
                for (int i = 0; i < n; i++)
                    result[i] = Integer.parseInt(word());
                return result;
            }

            public long[] longs(int n) {
                long[] result = new long[n];
                for (int i = 0; i < n; i++)
                    result[i] = Long.parseLong(word());
                return result;
            }
        }

        public static class Out {
            private BufferedWriter writer;
            private boolean isEmptyLine = true;

            public Out(BufferedWriter writer) {
                this.writer = writer;
            }

            private Out write(String str) {
                try {
                    if (!isEmptyLine)
                        writer.write(" ");
                    else
                        isEmptyLine = false;
                    writer.write(str);
                    return this;
                }
                catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }

            public Out ln() {
                try {
                    writer.newLine();
                    writer.flush();
                    isEmptyLine = true;
                    return this;
                }
                catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }

            public Out write(Object obj) {
                return write(obj.toString());
            }

            public Out write(int num) {
                return write(Integer.toString(num));
            }

            public Out write(long num) {
                return write(Long.toString(num));
            }

            public Out write(Object[] objs) {
                for (Object obj : objs)
                    write(obj);
                return this;
            }

            public <T> Out write(Iterable<T> iter) {
                for (T obj : iter)
                    write(obj);
                return this;
            }

            public Out write(int[] nums) {
                for (int num : nums)
                    write(num);
                return this;
            }

            public Out write(long[] nums) {
                for (long num : nums)
                    write(num);
                return this;
            }
        }
    }

    public static class BO {
        public static int bitOf(long number, int position) {
            if (position < 0 || position > 63)
                throw new IllegalArgumentException("Position must be from 0 to 63. Actual position: " + position);

            return (number & (1L << position)) == 0 ? 0 : 1;
        }

        public static long changeBit(long number, int position, int value) {
            if (position < 0 || position > 63)
                throw new IllegalArgumentException("Position must be from 0 to 63. Actual position: " + position);
            if (value != 0 && value != 1)
                throw new IllegalArgumentException("Value must be 0 or 1. Actual value: " + value);

            if (value == 1) {
                return number | (1L << position);
            }
            else {
                return ~changeBit(~number, position, 1);
            }
        }

        public static int[] longToBitsArray(long number) {
            int[] array = new int[64];
            for (int i = 0; i < array.length; i++)
                array[i] = bitOf(number, i);
            return array;
        }

        public static long bitsArrayToLong(int[] array) {
            long number = 0;
            for (int i = 0; i < array.length; i++)
                if (array[i] == 1)
                    number = BO.changeBit(number, i, 1);
            return number;
        }
    }

}
