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.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

//import Number_theory.pair;

public class hacker49 {
	public static int r1=0;
	static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
	static class pair{
		private long cnt;
		private long[] fq;
		private long[] pref;
		pair(){
			fq=new long[41];
			pref=new long[41];
			cnt=(long)0;
		}	
	}
	
	public static void main(String[] args) {
		OutputStream outputStream =System.out;
	    PrintWriter out =new PrintWriter(outputStream);
		FastReader s=new FastReader();
        int n=s.nextInt();
       TreeMap<Character,Integer> e=new TreeMap<>();
        String str=s.next();
        for(int i=0;i<n;i++) {
        if(!e.containsKey(str.charAt(i))) {
        	e.put(str.charAt(i), 1);
        }else {
        	e.put(str.charAt(i), e.get(str.charAt(i))+1);
        }
        }
		if(e.size()==3) {
		out.println("BGR");
		}else if(e.size()==1) {
			out.println(e.firstKey());
		}else {
			if(e.containsKey('B') && e.containsKey('R')) {
				if(e.get('B')==1 && e.get('R')==1) {
					out.println('G');
				}else if(e.get('B')>=2 && e.get('R')==1) {
					out.println("GR");
				}else if(e.get('B')==1 && e.get('R')>=2) {
					out.println("BG");
				}else {
					out.println("BGR");
				}
			}else if(e.containsKey('G') && e.containsKey('R')) {
				if(e.get('G')==1 && e.get('R')==1) {
					out.println('B');
				}else if(e.get('G')>=2 && e.get('R')==1) {
					out.println("BR");
				}else if(e.get('G')==1 && e.get('R')>=2) {
					out.println("BG");
				}else {
					out.println("BGR");
				}
			}else {
				
				
				if(e.get('G')==1 && e.get('B')==1) {
					out.println('R');
				}else if(e.get('G')>=2 && e.get('B')==1) {
					out.println("BR");
				}else if(e.get('G')==1 && e.get('B')>=2) {
					out.println("GR");
				}else {
					out.println("BGR");
				}
				
			}
			
		}
		out.close();
	}
	
	static long mod=1000000007;
//	for(int i=2;i<=100000;i++) {
		
//	}
	static long[] f=new long[200001];
	static void fac() {
		f[0]=1;
		f[1]=1;
		for(long i=2;i<=200000;i++) {
			f[(int) i]=(i*f[(int) (i-1)])%mod;
		}
	}
	static int get=0;
	static int h=0;
	static void  ans(int b,int sum) {
		if(b==0) {
			if(sum==get) {
				h++;
			}
			return;
		}else {
			ans(b-1,sum+1);
			ans(b-1,sum-1);
			
		}
		
		
	}
	static int lower(char[] b,int n) {
		int l=3;
		int r=n;
//		for(int i=0;i<32;i++) {
		while(r!=l) {
			int mid=(l+r)/2;
			if(good(b,mid)) {
				r=mid;
			}else {
				l=mid+1;
			}
		}
//		}
		if(r==(n)) {
			return 0;
		}else {
			return (r);
		}
	}
	static boolean good(char[] b,int k) {
		int[] a=new int[4];
		int l=1;
		int r=k+1;
//		System.out.println(k);
		int n=b.length;
		for(int i=1;i<=k;i++) {
			a[(int)(b[i]-'0')]++;
		}
		if(a[1]>0 && a[2]>0 && a[3]>0) {
			return true;
		}else {
			boolean p=false;
			while(r<n) {
				a[(int)(b[l]-'0')]--;
				a[(int)(b[r]-'0')]++;
				if(a[1]>0 && a[2]>0 && a[3]>0) {
					p=true;
					break;
				}
//				System.out.println(1);
				l++;
				r++;
			}
			if(p) {
				return true;
			}
			return false;
		}
	}
	static ArrayList<Long> d=new ArrayList<>(); 
	public static long res=1;
	public static void pf(long n) {
		
		 for (long i=1; i<=Math.sqrt(n); i++)
	        {
	            if (n%i==0)
	            {
	                // If divisors are equal, print only one
	                if (n/i == i) {
//	                    System.out.print(" "+ i);
	                	d.add(i);
	                }else { // Otherwise print both
	                    d.add(i);
	                    d.add(n/i);}
	            }
	        }	
	}

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	public static void Create(long[] a,pair[] segtree,int low,int high,int pos) {
		if(low>high) {
			return;
		}
		if(low==high) {
			for(int i=1;i<=40;i++) {
				if(i==a[low]) {
					segtree[pos].fq[i]=1;
				}else {
					segtree[pos].fq[i]=0;
				}
				segtree[pos].pref[i]=segtree[pos].fq[i]+segtree[pos].pref[i-1];
			}
			
			return ;
		}
		int mid=(low+high)/2;
		Create(a,segtree,low,mid,2*pos);
		Create(a,segtree,mid+1,high,2*pos+1);
		pair a3=new pair();
		for(int i=1;i<=40;i++) {
			a3.fq[i]=segtree[2*pos].fq[i] +segtree[2*pos+1].fq[i];
			a3.pref[i]=a3.fq[i]+a3.pref[i-1];
		}
		for(int i=1;i<=40;i++) {
		a3.cnt+=segtree[2*pos].fq[i]*segtree[2*pos+1].pref[i-1];
		}
		a3.cnt+=segtree[2*pos].cnt+segtree[2*pos+1].cnt;
		for(int i=1;i<=40;i++) { 
		segtree[pos].fq[i]=a3.fq[i];
		 segtree[pos].pref[i]=a3.pref[i];} 
		segtree[pos].cnt=a3.cnt;
	}
	public static void update(pair[] segtree,int low,int high,int index,int pos,int val) {
		
		if(low==high && low==index) {
			for(int i=1;i<=40;i++) {
				if(i==val) {
					segtree[pos].fq[val]=1;
				}else {
					segtree[pos].fq[i]=0;
				}
				segtree[pos].pref[i]=segtree[pos].fq[i]+segtree[pos].pref[i-1];
			}
			segtree[pos].cnt=(long)0;
			return;
		}
			int mid=(high+low)/2; 
			if(index<=mid) {
			update(segtree,low,mid,index,2*pos,val);}else {
			 update(segtree,mid+1,high,index,2*pos+1,val);}
			pair a3=new pair();
			for(int i=1;i<=40;i++) {
				a3.fq[i]=segtree[2*pos].fq[i] +segtree[2*pos+1].fq[i];
				a3.pref[i]=a3.fq[i]+a3.pref[i-1];
			}
			for(int i=1;i<=40;i++) {
			a3.cnt+=segtree[2*pos].fq[i]*segtree[2*pos+1].pref[i-1];
			}
			a3.cnt+=segtree[2*pos].cnt+segtree[2*pos+1].cnt;
			for(int i=1;i<=40;i++) { 
			segtree[pos].fq[i]=a3.fq[i];
			 segtree[pos].pref[i]=a3.pref[i];} 
			segtree[pos].cnt=a3.cnt;
	}
	public static pair query(pair[] segtree,int low,int high,int qlow,int qhigh ,int pos) {
		if(low>=qlow && high<=qhigh) {
			return segtree[pos];
		}
		if(qhigh<low || qlow>high) {
			return new pair();
		}
		int mid=(low+high)/2;
		
	  pair a1=query(segtree,low,mid,qlow,qhigh,2*pos);
	  pair a2=query(segtree,mid+1,high,qlow,qhigh,2*pos+1);
	  pair a3=new pair();
	  for(int i=1;i<=40;i++) {
			a3.fq[i]=a1.fq[i] +a2.fq[i];
			a3.pref[i]=a3.fq[i]+a3.pref[i-1];
		}
		for(int i=1;i<=40;i++) {
			a3.cnt+=a1.fq[i]*a2.pref[i-1];
		}
		a3.cnt+=a1.cnt+a2.cnt;
	  return a3;
	  
	}
	
	public static long nextPowerOf2(long n) 
	{ 
	    n--; 
	    n |= n >> 1; 
	    n |= n >> 2; 
	    n |= n >> 4; 
	    n |= n >> 8; 
	    n |= n >> 16; 
	    n++;     
	    return n; 
	} 
	}
