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.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Objects;
import java.util.Random;
import java.lang.*;

public class Solver {

InputReader in;
Printer out;

long MOD = 1000000007;

public void startTask() throws Exception {
	int n = in.nextInt();
	String ins = in.nextString();
	int r=0,g=0,b=0;
	
	for (int i=0; i<n; i++) {
		if(ins.charAt(i)=='R')r++;
		else if (ins.charAt(i)=='G')g++;
		else if (ins.charAt(i)=='B')b++;
	}
	
	boolean[] last= new boolean[3];
	
	if(r>=1 && g>=1 && b>=1){
		//All
		last[0]=true;
		last[1]=true;
		last[2]=true;
	}else{
		if(r>1) r=2;
		if(b>1) b=2;
		if(g>1) g=2;
		int[] sorted = new int[3];
		int[] col = new int[3];
		if(b<=g){
			if(b<=r){
				sorted[0]=b;
				col[0]=0;
				if(g<=r){
					sorted[1]=g;col[1]=1;
					sorted[2]=r;col[2]=2;
				}else{
					sorted[1]=r;col[1]=2;
					sorted[2]=g;col[2]=1;
				}
			}else{
				sorted[0]=r;col[0]=2;
				sorted[1]=b;col[1]=0;
				sorted[2]=g;col[2]=1;
			}
		}else{//g<b
			if(g<=r){
				sorted[0]=g;
				col[0]=1;
				if(b<=r){
					sorted[1]=b;col[1]=0;
					sorted[2]=r;col[2]=2;
				}else{
					sorted[1]=r;col[1]=2;
					sorted[2]=b;col[2]=0;
				}
			}else{ //r<g
				sorted[0]=r;col[0]=2;
				sorted[1]=g;col[1]=1;
				sorted[2]=b;col[2]=0;
			}
		}
		
		if(sorted[0]==0 && sorted[1]==1 && sorted[2]==2){
			last[col[0]]=true;
			last[col[1]]=true;
		} else if(sorted[0]==0 && sorted[1]==1 && sorted[2]==1){
			last[col[0]]=true;
		} else if(sorted[0]==0 && sorted[1]==2 && sorted[2]==2){
			last[col[0]]=true;
			last[col[1]]=true;
			last[col[2]]=true;
		} else if(sorted[0]==0 && sorted[1]==0 && sorted[2]==1){
			last[col[2]]=true;
		} else if(sorted[0]==0 && sorted[1]==0 && sorted[2]==2){
			last[col[2]]=true;
		}
		
	}	
	//BGR
	
	if (last[0]) out.print('B');
	if (last[1]) out.print('G');
	if (last[2]) out.print('R');
	
	out.println();
	

}


public static void main(String[] args) throws Exception {
	InputReader in;
	PrintStream out;

	//in = new InputReader(new FileInputStream(new File("in.txt")));
	//out = new PrintStream("out.txt");
	in = new InputReader(System.in);
	out = System.out;

	Solver main = new Solver();

	main.in = in;
	main.out = new Printer(out,true); // true for autoFlush

	main.startTask();
	
	out.flush();
}

private static class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private 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 nextInt() {
		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 nextString() {
		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 double nextDouble() {
		int c = read();
		while (isSpaceChar(c)) {
		c = read();
		}
		int sgn = 1;
		if (c == '-') {
		sgn = -1;
		c = read();
		}
		double res = 0;
		while (!isSpaceChar(c) && c != '.') {
		if (c == 'e' || c == 'E') {
			return res * Math.pow(10, nextInt());
		}
		if (c < '0' || c > '9') {
			throw new InputMismatchException();
		}
		res *= 10;
		res += c - '0';
		c = read();
		}
		if (c == '.') {
		c = read();
		double m = 1;
		while (!isSpaceChar(c)) {
			if (c == 'e' || c == 'E') {
				return res * Math.pow(10, nextInt());
			}
			if (c < '0' || c > '9') {
				throw new InputMismatchException();
			}
			m /= 10;
			res += (c - '0') * m;
			c = read();
		}
		}
		return res * sgn;
	}

	public long nextLong() {
		int c = read();
		while (isSpaceChar(c)) {
		c = read();
		}
		int 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 (!isSpaceChar(c));
		return res * sgn;
	}

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

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

	public interface SpaceCharFilter {

		public boolean isSpaceChar(int ch);
	}
}

private static class Printer {

	PrintStream out;
	StringBuilder buffer = new StringBuilder();
	boolean autoFlush;

	public Printer(PrintStream out) {
		this.out = out;
	}

	public Printer(PrintStream out, boolean autoFlush) {
		this.out = out;
		this.autoFlush = autoFlush;
	}

	public void println() {
		buffer.append("\n");

		if (autoFlush) {
		flush();
		}
	}

	public void println(int n) {
		println(Integer.toString(n));
	}

	public void println(long n) {
		println(Long.toString(n));
	}

	public void println(double n) {
		println(Double.toString(n));
	}

	public void println(float n) {
		println(Float.toString(n));
	}

	public void println(boolean n) {
		println(Boolean.toString(n));
	}

	public void println(char n) {
		println(Character.toString(n));
	}

	public void println(byte n) {
		println(Byte.toString(n));
	}

	public void println(short n) {
		println(Short.toString(n));
	}

	public void println(Object o) {
		println(o.toString());
	}

	public void println(Object[] o) {
		println(Arrays.deepToString(o));
	}

	public void println(String s) {
		buffer.append(s).append("\n");

		if (autoFlush) {
		flush();
		}
	}

	public void print(char s) {
		buffer.append(s);

		if (autoFlush) {
		flush();
		}
	}

	public void print(String s) {
		buffer.append(s);

		if (autoFlush) {
		flush();
		}
	}

	public void flush() {
		try {
		BufferedWriter log = new BufferedWriter(new OutputStreamWriter(out));
		log.write(buffer.toString());

		log.flush();
		buffer = new StringBuilder();
		} catch (Exception e) {
		e.printStackTrace();
		}
	}
}

private class Pair<T, U> implements Serializable {

	private T key;

	public T getKey() {
		return key;
	}

	private U value;

	public U getValue() {
		return value;
	}

	public Pair(T key, U value) {
		this.key = key;
		this.value = value;
	}

	@Override
	public String toString() {
		return key + "=" + value;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null) {
		return false;
		}
		if (getClass() != obj.getClass()) {
		return false;
		}

		final Pair other = (Pair) obj;
		if (!this.key.equals(other.key)) {
		return false;
		}

		return this.value.equals(other.value);
	}

	@Override
	public int hashCode() {
		return Objects.hash(key, value);
	}
}

}