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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.invoke.MethodHandles;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Random;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.stream.Collectors;

public class Main {

    public static void main(String[] args) {
        parseAndGenerate();
        try (PrintWriter out = new PrintWriter(System.out)) {
            FastScanner scanner = new FastScanner();
            int n = scanner.nextInt();
            String str = scanner.next();
            HashMap<Character, Integer> map = new HashMap<>();
            for (char ch : str.toCharArray()) {
                map.put(ch, map.getOrDefault(ch, 0) + 1);
            }
            if (map.size() == 3) {
                out.println("BGR");
            } else if (map.size() == 1) {
                out.println(map.keySet().iterator().next());
            } else {
                char first = 0, second = 0, last = 0;
                for (char ch : "RGB".toCharArray()) {
                    if (map.containsKey(ch) && first == 0) {
                        first = ch;
                    } else if (map.containsKey(ch)) {
                        second = ch;
                    }
                    if (!map.containsKey(ch)) {
                        last = ch;
                    }
                }
                char[] arr = new char[2];
                if (map.get(first) == 1 && map.get(second) == 1) {
                    out.println(last);
                    return;
                } else if (map.get(first) >= 2 && map.get(second) >= 2) {
                    out.println("BGR");
                    return;
                } else if (map.get(first) == 1) {
                    arr[0] = first;
                    arr[1] = last;
                } else if (map.get(second) == 1) {
                    arr[0] = second;
                    arr[1] = last;
                }
                Arrays.sort(arr);
                out.println(new String(arr));
            }
        }
    }

    static final Random random = new Random();

    static void ruffleSort(long[] a) {
        // shuffle, then sort
        int n = a.length;
        for (int i = 0; i < n; i++) {
            int oi = random.nextInt(n);
            long temp = a[oi];
            a[oi] = a[i];
            a[i] = temp;
        }
        Arrays.sort(a);
    }

    static class FastScanner {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        StringTokenizer st = new StringTokenizer("");

        String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long[] readArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextLong();
            }
            return a;
        }

        Integer[] readArrayInt(int n) {
            Integer[] a = new Integer[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }

    static class Pair {

        int first;

        int second;

        public Pair(int first, int second) {
            this.first = first;
            this.second = second;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            Pair pair = (Pair) o;
            return first == pair.first && second == pair.second;
        }

        @Override
        public int hashCode() {
            return Objects.hash(first, second);
        }
    }

    static class Equation {

        // ax+by=c;
        int a, b, c;

        public Equation(int x1, int y1, int x2, int y2) {
            int a = y2 - y1;
            int b = x1 - x2;
            int c = a * x1 + b * y1;
        }

        public Equation(int a, int b, int c) {
            this.a = a;
            this.b = b;
            this.c = c;
        }

        public boolean isPointOnLine(int x, int y) {
            return a * x + b * y == c;
        }
    }

    private static void buildGraph(HashMap<Integer, Set<Integer>> map, int first, int second) {
        Set<Integer> set = map.getOrDefault(first, new HashSet<>());
        set.add(second);
        map.put(first, set);
        set = map.getOrDefault(second, new HashSet<>());
        set.add(first);
    }

    public static void parseAndGenerate() {
    }

    private static void print2dArr(PrintWriter out, int[][] arr) {
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                out.print(arr[i][j] + " ");
            }
            out.println();
        }
    }

    private static boolean[] sieve(int n) {
        boolean[] isPrime = new boolean[n + 1];
        Arrays.fill(isPrime, true);
        isPrime[0] = isPrime[1] = false;
        for (int i = 2; i <= n; i++) {
            if (isPrime[i] && ((long) i * i) <= n) {
                for (int j = i * i; j <= n; j += i) {
                    isPrime[j] = false;
                }
            }
        }
        return isPrime;
    }
}
