import java.util.*;
import java.io.*;

public class p253A {
	public static void main(String[] args) throws Exception {
		Scanner in = new Scanner(new FileReader(new File("input.txt")));

		int b = in.nextInt(), g = in.nextInt();

		StringBuilder sb = new StringBuilder();
		while(b > 0 && g > 0) {
			sb.append("BG");
			--b;
			--g;
		}

		while(b-- > 0) sb.append("B");
		while(g-- > 0) sb.append("G");

		PrintWriter pw = new PrintWriter(new FileWriter(new File("output.txt")));
		pw.write(sb.toString());
		pw.close();
	}
}


import java.util.*;
import java.io.*;

public class p253A {
	public static void main(String[] args) throws Exception {
		Scanner in = new Scanner(new FileReader(new File("input.txt")));

		int b = in.nextInt(), g = in.nextInt();

		StringBuilder sb = new StringBuilder();
		while(b > 0 && g > 0) {
			if(b > g)
				sb.append("BG");
			else
				sb.append("GB");
			--b;
			--g;
		}

		while(b-- > 0) sb.append("B");
		while(g-- > 0) sb.append("G");

		PrintWriter pw = new PrintWriter(new FileWriter(new File("output.txt")));
		pw.write(sb.toString());
		pw.close();
	}
}


import java.util.*;
public class Main{
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		int min = n;
		boolean es_boy = true;
		if(min > m){
			min = m;
			es_boy = false;
		}
		for(int i = 0; i < min; i++){
			if(es_boy){
				System.out.print("GB");
			}else{
				System.out.print("BG");
			}

		}
		for(int i = min; i < n; i++){
			System.out.print("B");
		}
		for(int i = min; i < m; i++){
			System.out.print("G");
		}
	}
}


import java.util.*;
public class BoysAndGirls{
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		int min = n;
		boolean es_boy = true;
		if(min > m){
			min = m;
			es_boy = false;
		}
		for(int i = 0; i < min; i++){
			if(es_boy){
				System.out.print("GB");
			}else{
				System.out.print("BG");
			}

		}
		for(int i = min; i < n; i++){
			System.out.print("B");
		}
		for(int i = min; i < m; i++){
			System.out.print("G");
		}
	}
}


import java.util.*;
public class BoysAndGirls{
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		s.nextLine();
		int min = n;
		boolean es_boy = true;
		if(min > m){
			min = m;
			es_boy = false;
		}
		for(int i = 0; i < min; i++){
			if(es_boy){
				System.out.print("GB");
			}else{
				System.out.print("BG");
			}

		}
		for(int i = min; i < n; i++){
			System.out.print("B");
		}
		for(int i = min; i < m; i++){
			System.out.print("G");
		}
	}
}


import java.util.*;
import java.io.*;
public class BoysAndGirls{
	public static void main(String args[]){
		try{
			RandomAccessFile salida = new RandomAccessFile(new File("output.txt"), "rw");
			Scanner s = new Scanner(new File("input.txt"));
			int n = s.nextInt();
			int m = s.nextInt();
			int min = n;
			boolean es_boy = true;
			if(min > m){
				min = m;
				es_boy = false;
			}
			for(int i = 0; i < min; i++){
				if(es_boy){
					salida.writeBytes("GB");
				}else{
					salida.writeBytes("BG");
				}

			}
			for(int i = min; i < n; i++){
				salida.writeBytes("B");
			}
			for(int i = min; i < m; i++){
				salida.writeBytes("G");
			}
		}catch(FileNotFoundException e){}catch(IOException e){}
	}
}


import java.io.*;
import java.math.*;
import java.util.*;

//codeforces
public class Main2 {
    private static Scanner in;
    private static PrintStream out = System.out;

    public static void main(String[] args) throws IOException {
        // helpers for input/output
        boolean LOCAL_TEST = false;
        // LOCAL_TEST = true;// comment it before submitting
        in = new Scanner(System.in);
        if (LOCAL_TEST) {
            in = new Scanner(new FileInputStream("E:\\zin2.txt"));
        }

        in = new Scanner(new FileInputStream("input.txt"));
        out = new PrintStream("output.txt");
        solve();
    }

    private static void solve()
    {
        int N = in.nextInt();
        int M = in.nextInt();
        boolean moreBoys = false;
        if (N >= M)
            moreBoys = true;
        while (N > 0 || M > 0) {
            if (moreBoys) {
                if (N > 0) {
                    out.print("B");
                    N--;
                }
                if (M > 0) {
                    out.print("G");
                    M--;
                }
            }
            else {
                if (M > 0) {
                    out.print("G");
                    M--;
                }
                if (N > 0) {
                    out.print("B");
                    N--;
                }
            }
        }
        System.out.println("");
    }

}


import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

public class Codeforces2 {

	public static void main(String[] args) {
		Scanner scanner = null;
		try {
			scanner = new Scanner(new File("input.txt"));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		int chlapcov = scanner.nextInt();
		int dievcat = scanner.nextInt();
		String result = "";

		while (chlapcov + dievcat != 0) {
			if (chlapcov == 0) {
				for (int i = 0; i < dievcat; i++) {
					result += "G";
					dievcat--;
				}
			} else if (dievcat == 0) {
				for (int i = 0; i < chlapcov; i++) {
					result += "B";
					chlapcov--;
				}
			} else if (chlapcov >= dievcat) {
				for (int i = 0; i < dievcat; i++) {
					result += "BG";
					chlapcov--;
					dievcat--;
				}
			} else if (chlapcov < dievcat) {
				for (int i = 0; i < chlapcov; i++) {
					result += "GB";
					chlapcov--;
					dievcat--;
				}
			}
		}
		FileWriter fstream;
		try {
			fstream = new FileWriter("out.txt");
			BufferedWriter out = new BufferedWriter(fstream);
			out.write(result);
			out.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}


import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.StreamTokenizer;

public class Codeforces2 {

	public static void main(String[] args) {
		Reader reader = new Reader();
		int chlapcov = reader.nextInt();
		int dievcat = reader.nextInt();

		while (chlapcov + dievcat != 0) {
			if(chlapcov == 0){
				for (int i = 0; i < dievcat; i++) {
					System.out.print("G");
					dievcat--;
				}
			}else if(dievcat == 0){
				for (int i = 0; i < chlapcov; i++) {
					System.out.print("B");
					chlapcov--;
				}
			}else
			if (chlapcov >= dievcat) {
				for (int i = 0; i < dievcat; i++) {
					System.out.print("BG");
					chlapcov--;
					dievcat--;
				}
			}else
			if (chlapcov < dievcat) {
				for (int i = 0; i < chlapcov; i++) {
					System.out.print("GB");
					chlapcov--;
					dievcat--;
				}
			}
			//System.out.println(dievcat + " - " + chlapcov);
		}
		System.out.println();

	}

	static class Reader {
		@SuppressWarnings("deprecation")
		StreamTokenizer in = new StreamTokenizer(new BufferedInputStream(
				System.in));

		public int nextInt() {
			try {
				in.nextToken();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return (int) in.nval;
		}

		public long nextLong() {
			try {
				in.nextToken();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return (long) in.nval;
		}

		public String next() {
			try {
				in.nextToken();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return in.sval;
		}
	}

}


import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

public class Codeforces2 {

    public static void main(String[] args) {
        Scanner scanner = null;
        try {
            scanner = new Scanner(new File("input.txt"));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        int chlapcov = scanner.nextInt();
        int dievcat = scanner.nextInt();
        String result = "";

        while (chlapcov + dievcat != 0) {
            if (chlapcov == 0) {
                for (int i = 0; i < dievcat; i++) {
                    result += "G";
                    dievcat--;
                }
            } else if (dievcat == 0) {
                for (int i = 0; i < chlapcov; i++) {
                    result += "B";
                    chlapcov--;
                }
            } else if (chlapcov >= dievcat) {
                for (int i = 0; i < dievcat; i++) {
                    result += "BG";
                    chlapcov--;
                    dievcat--;
                }
            } else if (chlapcov < dievcat) {
                for (int i = 0; i < chlapcov; i++) {
                    result += "GB";
                    chlapcov--;
                    dievcat--;
                }
            }
        }
        FileWriter fstream;
        try {
            fstream = new FileWriter("output.txt");
            BufferedWriter out = new BufferedWriter(fstream);
            out.write(result);
            out.close();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

    }

}


import java.util.Scanner;

public class Main{

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int min = Math.min(n,m);
        if(min==n){
            for (int i = 0; i < min; i++) {
                System.out.print("GB");
            }
            for (int i = 0; i < m-n; i++) {
                System.out.print("G");
            }
        }else{
            for (int i = 0; i < min; i++) {
                System.out.print("BG");
            }
            for (int i = 0; i < n-m; i++) {
                System.out.print("B");
            }
        }
        System.out.println("");
    }
}


import java.util.Scanner;
public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int min = Math.min(n,m);
        if(min==n){
            for (int i = 0; i < min; i++) {
                System.out.print("GB");
            }
            for (int i = 0; i < m-n; i++) {
                System.out.print("G");
            }
        }else{
            for (int i = 0; i < min; i++) {
                System.out.print("BG");
            }
            for (int i = 0; i < n-m; i++) {
                System.out.print("B");
            }
        }
        System.out.println("");

    }
}


import java.io.*;
import java.util.*;

public class Main {
    private IO io;
    private int ioMode = -1;
    private String problemName = "";
    private final String mjArgument = "master_j";

    public static void main(String programArguments[]) throws IOException{
        if(programArguments != null && programArguments.length > 0)
            new Main().run(programArguments[0]);
        else
            new Main().run(null);
    }

    private void run(String programArgument) throws IOException {
//         _______________________________________________ _________
//        |   Input Mode     |      Output Mode    | mode | comment |
//        |------------------|---------------------|----- |---------|
//        |   input.txt      |      System.out     |  0   |    mj   |
//        |   System.in      |      System.out     |  1   |  T / CF |
//        |<problemName>.in  |  <problemName>.out  |  2   |         |
//        |   input.txt      |      output.txt     |  3   |    C    |
//        |__________________|_____________________|______|_________|
        long nanoTime = 0;
        if(programArgument != null && programArgument.equals(mjArgument)) // mj
            ioMode = 0;
        else if(System.getProperty("ONLINE_JUDGE") != null) // T / CF
            ioMode = 1;
        else
            ioMode = 2;
        switch(ioMode = 3){
            case -1:
                try{
                    throw new Exception("<ioMode> init failure") ;
                }catch (Exception e){
                    e.printStackTrace();
                }
                return;
            case 0:
                break;
            case 1:
                break;
            case 2:
                if(problemName.length() == 0){
                    try{
                        throw new Exception("<problemName> init failure");
                    }catch (Exception e){
                        e.printStackTrace();
                    }
                    return;
                }
            case 3:
                break;
        }
        io = new IO(ioMode, problemName);
        if(ioMode == 0){
            System.out.println("File output : \n<start>");
            System.out.flush();
            nanoTime = System.nanoTime();
        }
        solve();
        io.flush();
        if(ioMode == 0){
            System.out.println("</start>");
            long t = System.nanoTime() - nanoTime;
            int d3 = 1000000000, d2 = 1000000, d1 = 1000000;
            if(t>=d3)
                System.out.println(t/d3 + "." + t%d3 + " seconds");
            else if(t>=d2)
                System.out.println(t/d2 + "." + t%d2 + " millis");
            else if(t>=d1)
                System.out.println(t/d1 + "." + t%d1 + " millis");
            System.out.flush();
        }
    }

    private void solve() throws IOException {
        int n = io.nI(), m = io.nI(), k = Math.min(n, m);
        if(n >= m){
            for(int i = 0; i<m; i++)
                io.w("BG");
            for(int i = m; i<n; i++)
                io.w('B');
        }else{
            for(int i = 0; i<n; i++)
                io.w("GB");
            for(int i = n; i<m; i++)
                io.w('G');
        }
        io.wln();
    }//2.2250738585072012e-308

    /**
     * Input-output class
     * @author master_j
     * @version 0.2.4
     */
    @SuppressWarnings("unused")
    private class IO{
        private boolean alwaysFlush;
        StreamTokenizer in; PrintWriter out; BufferedReader br; Reader reader; Writer writer;
        public IO(int ioMode, String problemName) throws IOException{
            Locale.setDefault(Locale.US);
//         _______________________________________________ _________
//        |   Input Mode     |      Output Mode    | mode | comment |
//        |------------------|---------------------|----- |---------|
//        |   input.txt      |      System.out     |  0   |    mj   |
//        |   System.in      |      System.out     |  1   |  T / CF |
//        |<problemName>.in  |  <problemName>.out  |  2   |         |
//        |   input.txt      |      output.txt     |  3   |    C    |
//        |__________________|_____________________|______|_________|
            switch(ioMode){
                case 0:
                    reader = new FileReader("input.txt");
                    writer = new OutputStreamWriter(System.out);
                    break;
                case 1:
                    reader = new InputStreamReader(System.in);
                    writer = new OutputStreamWriter(System.out);
                    break;
                case 2:
                    reader = new FileReader(problemName + ".in");
                    writer = new FileWriter(problemName + ".out");
                    break;
                case 3:
                    reader = new FileReader("input.txt");
                    writer = new FileWriter("output.txt");
                    break;
            }
            br = new BufferedReader(reader);
            in = new StreamTokenizer(br);
            out = new PrintWriter(writer);
            alwaysFlush = false;
        }
        public void setAlwaysFlush(boolean arg){alwaysFlush = arg;}
        public void wln(){out.println(); if(alwaysFlush)flush();}
        public void wln(int arg){out.println(arg); if(alwaysFlush)flush();}
        public void wln(long arg){out.println(arg); if(alwaysFlush)flush();}
        public void wln(double arg){out.println(arg); if(alwaysFlush)flush();}
        public void wln(String arg){out.println(arg); if(alwaysFlush)flush();}
        public void wln(boolean arg){out.println(arg); if(alwaysFlush)flush();}
        public void wln(char arg){out.println(arg); if(alwaysFlush)flush();}
        public void wln(float arg){out.println(arg); if(alwaysFlush)flush();}
        public void wln(Object arg){out.println(arg); if(alwaysFlush)flush();}
        public void w(int arg){out.print(arg); if(alwaysFlush)flush();}
        public void w(long arg){out.print(arg); if(alwaysFlush)flush();}
        public void w(double arg){out.print(arg); if(alwaysFlush)flush();}
        public void w(String arg){out.print(arg); if(alwaysFlush)flush();}
        public void w(boolean arg){out.print(arg); if(alwaysFlush)flush();}
        public void w(char arg){out.print(arg); if(alwaysFlush)flush();}
        public void w(float arg){out.print(arg); if(alwaysFlush)flush();}
        public void w(Object arg){out.print(arg); if(alwaysFlush)flush();}
        public void wf(String format, Object...args){out.printf(format, args); if(alwaysFlush)flush();}
        public void flush(){out.flush();}
        public int nI() throws IOException {in.nextToken(); return(int)in.nval;}
        public long nL() throws IOException {in.nextToken(); return(long)in.nval;}
        public String nS() throws IOException {in.nextToken(); return in.sval;}
        public double nD() throws IOException {in.nextToken(); return in.nval;}
        public float nF() throws IOException {in.nextToken(); return (float)in.nval;}
        public char nC() throws IOException {return (char)br.read();}
        public void wc(char...arg){for(char c : arg){in.ordinaryChar(c);in.wordChars(c, c);}}
        public void wc(String arg){wc(arg.toCharArray());}
        public void wc(char arg0, char arg1){in.ordinaryChars(arg0, arg1); in.wordChars(arg0, arg1);}
        public boolean eof(){return in.ttype == StreamTokenizer.TT_EOF;}
        public boolean eol(){return in.ttype == StreamTokenizer.TT_EOL;}
    }
}


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader cin=new BufferedReader(new FileReader("input.txt"));
        PrintWriter out = new PrintWriter(new FileWriter("output.txt"));
        String aux[]=cin.readLine().split(" ");
        int a=Integer.parseInt(aux[0]),b=Integer.parseInt(aux[1]),ind=a==b?a:Math.min(a, b),ma=a==b?0:(a+b)-Math.max(a, b);
        char c=a>b?'B':'G';
        for(int i=0;i<ind;i++)
            out.write(a>b?"BG":"GB");
        for(int i=0;i<ma;i++)
            out.write(c+"");
        out.write("\n");
        out.flush();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader cin=new BufferedReader(new InputStreamReader("input.txt"));
        PrintWriter out = new PrintWriter("output.txt");
        String aux[]=cin.readLine().split(" ");
        int a=Integer.parseInt(aux[0]),b=Integer.parseInt(aux[1]),ind=a==b?a:Math.min(a, b),ma=a==b?0:(a+b)-Math.max(a, b);
        char c=a>b?'B':'G';
        for(int i=0;i<ind;i++)
            out.write(a>b?"BG":"GB");
        for(int i=0;i<ma;i++)
            out.write(c+"");
        out.write("\n");
        out.flush();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader cin=new BufferedReader("input.txt");
        PrintWriter out = new PrintWriter("output.txt");
        String aux[]=cin.readLine().split(" ");
        int a=Integer.parseInt(aux[0]),b=Integer.parseInt(aux[1]),ind=a==b?a:Math.min(a, b),ma=a==b?0:(a+b)-Math.max(a, b);
        char c=a>b?'B':'G';
        for(int i=0;i<ind;i++)
            out.write(a>b?"BG":"GB");
        for(int i=0;i<ma;i++)
            out.write(c+"");
        out.write("\n");
        out.flush();
    }
}


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader cin=new BufferedReader(new FileReader("input.txt"));
        PrintWriter out = new PrintWriter(new FileWriter("output.txt"));
        String aux[]=cin.readLine().split(" ");
        int a=Integer.parseInt(aux[0]),b=Integer.parseInt(aux[1]),ind=a==b?a:Math.min(a, b),ma=a==b?0:Math.max(a, b)-ind;
        char c=a>b?'B':'G';
        for(int i=0;i<ind;i++)
            out.write(a>b?"BG":"GB");
        for(int i=0;i<ma;i++)
            out.write(c+"");
        out.write("\n");
        out.flush();
    }
}


import java.io.*;
import java.math.*;
import java.util.*;

public class Program {

    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException {
        int b = in.nextInt();
        int g = in.nextInt();
        if(b > g){
            for(int i = 0; i < g; i++)
                out.print("BG");
            for(int i = 0; i < b - g; i++)
                out.print("B");
        }
        else{
            for(int i = 0; i < b; i++)
                out.print("GB");
            for(int i = 0; i < g - b; i++)
                out.print("G");
        }
    }

    public void run() {
        try {
            in = new FastScanner(new File("input.txt"));
            out = new PrintWriter(new File("output.txt"));

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {

        BufferedReader br;
        StringTokenizer st;

        FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

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

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

    public static void main(String[] arg) {
        new Program().run();
    }
}


import java.util.Scanner;

/**
 * Created by Masud on 6/21/14.
 */
public class a253 {
    public static void main(String[] args)  {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextLine()) {
            String[] arr = sc.nextLine().split(" +");
            int b = Integer.parseInt(arr[0]);
            int g = Integer.parseInt(arr[1]);
            StringBuilder output = new StringBuilder();
            int diff = Math.abs(b - g);
            int min = Math.min(b, g);
            if (b > g) {
                for (int i = 0; i < min; i++) {
                    output.append("B");
                    output.append("G");
                }
                for (int i = 0; i < diff; i++) {
                    output.append("B");
                }
            } else if (g >= b) {
                for (int i = 0; i < min; i++) {

                    output.append("G");
                    output.append("B");
                }
                for (int i = 0; i < diff; i++) {
                    output.append("G");
                }
            }
            System.out.println(output);
        }
    }
}


import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

/**
 * Created by Masud on 6/21/14.
 */
public class a253 {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(new File("input.txt"));
        StringBuilder output = new StringBuilder();
        while (sc.hasNextLine()) {
            String[] arr = sc.nextLine().split(" +");
            int b = Integer.parseInt(arr[0]);
            int g = Integer.parseInt(arr[1]);

            int diff = Math.abs(b - g);
            int min = Math.min(b, g);
            if (b > g) {
                for (int i = 0; i < min; i++) {
                    output.append("B");
                    output.append("G");
                }
                for (int i = 0; i < diff; i++) {
                    output.append("B");
                }
            } else if (g >= b) {
                for (int i = 0; i < min; i++) {

                    output.append("G");
                    output.append("B");
                }
                for (int i = 0; i < diff; i++) {
                    output.append("G");
                }
            }
            output.append("\n");
        }
        BufferedWriter writer=new BufferedWriter(new FileWriter("codeforces/output.txt"));
        writtput.substring(0,output.length()-1).toString());
        writer.close();
    }
}


import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

/**
 * Created by Masud on 6/21/14.
 */
public class a253 {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(new File("input.txt"));
        StringBuilder output = new StringBuilder();
        while (sc.hasNextLine()) {
            String[] arr = sc.nextLine().split(" +");
            int b = Integer.parseInt(arr[0]);
            int g = Integer.parseInt(arr[1]);

            int diff = Math.abs(b - g);
            int min = Math.min(b, g);
            if (b > g) {
                for (int i = 0; i < min; i++) {
                    output.append("B");
                    output.append("G");
                }
                for (int i = 0; i < diff; i++) {
                    output.append("B");
                }
            } else if (g >= b) {
                for (int i = 0; i < min; i++) {

                    output.append("G");
                    output.append("B");
                }
                for (int i = 0; i < diff; i++) {
                    output.append("G");
                }
            }
            output.append("\n");
        }
        BufferedWriter writer=new BufferedWriter(new FileWriter("output.txt"));
        writer.write(output.substring(0,output.length()-1).toString());
        writer.close();
    }
}


import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.io.FileInputStream;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream;
		try {
			inputStream = new FileInputStream("input.txt");
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		OutputStream outputStream;
		try {
			outputStream = new FileOutputStream("output.txt");
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
	public void solve(int testNumber, Scanner in, PrintWriter out) {
		int a = in.nextInt();
		int b = in.nextInt();
		if(a<b) {
			for(int i=0; i<a; i++) {
				out.print("GB");
			}
			for(int i=0; i<b-a; i++) {
				out.print("G");
			}
		} else {
			for(int i=0; i<b; i++) {
				out.print("BG");
			}
			for(int i=0; i<a-b; i++) {
				out.print("B");
			}
		}
	}
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class A253 {
  static FastScanner in;
  static FastWriter out;

  public static void main(String[] args) throws IOException {
    in = new FastScanner(System.in);
    out = new FastWriter(System.out);

    int n = in.nextInt();
    int m = in.nextInt();

    char a = 'B';
    char b = 'G';
    if (m > n) {
      a = 'G';
      b = 'B';
      int t = m;
      m = n;
      n = t;
    }

    while (m != 0) {
      out.print(a);
      out.print(b);
      n--;
      m--;
    }
    while (n != 0) {
      out.print(a);
      n--;
    }
    out.println();
    out.close();
  }

  static class FastScanner {
    BufferedReader br;
    StringTokenizer st;

    public FastScanner(InputStream in) {
      br = new BufferedReader(new InputStreamReader(in));
      st = new StringTokenizer("");
    }

    public FastScanner(File f) throws IOException {
      br = new BufferedReader(new FileReader(f));
      st = new StringTokenizer("");
    }

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

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

    public double nextDouble() throws IOException {
      return Double.parseDouble(next());
    }

    public String next() throws IOException {
      if (st.hasMoreTokens()) return st.nextToken();
      st = new StringTokenizer(br.readLine());
      return next();
    }
  }

  static class FastWriter extends PrintWriter {
    public FastWriter(OutputStream out) throws IOException {
      super(new BufferedWriter(new OutputStreamWriter(out)));
    }

    public FastWriter(File f) throws IOException {
      super(new BufferedWriter(new FileWriter(f)));
    }
  }
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class A253 {
  static FastScanner in;
  static FastWriter out;

  public static void main(String[] args) throws IOException {
    in = new FastScanner(System.in);
    out = new FastWriter(System.out);

    int n = in.nextInt();
    int m = in.nextInt();

    char a = 'B';
    char b = 'G';
    if (m > n) {
      a = 'G';
      b = 'B';
      int t = m;
      m = n;
      n = t;
    }

    while (m != 0) {
      out.printf("%c", a);
      out.printf("%c", b);
      n--;
      m--;
    }
    while (n != 0) {
      out.printf("%c", a);
      n--;
    }
    out.println();
    out.close();
  }

  static class FastScanner {
    BufferedReader br;
    StringTokenizer st;

    public FastScanner(InputStream in) {
      br = new BufferedReader(new InputStreamReader(in));
      st = new StringTokenizer("");
    }

    public FastScanner(File f) throws IOException {
      br = new BufferedReader(new FileReader(f));
      st = new StringTokenizer("");
    }

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

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

    public double nextDouble() throws IOException {
      return Double.parseDouble(next());
    }

    public String next() throws IOException {
      if (st.hasMoreTokens()) return st.nextToken();
      st = new StringTokenizer(br.readLine());
      return next();
    }
  }

  static class FastWriter extends PrintWriter {
    public FastWriter(OutputStream out) throws IOException {
      super(new BufferedWriter(new OutputStreamWriter(out)));
    }

    public FastWriter(File f) throws IOException {
      super(new BufferedWriter(new FileWriter(f)));
    }
  }
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class A253 {
  static FastScanner in;
  static FastWriter out;

  public static void main(String[] args) throws IOException {
    in = new FastScanner(new File("input.txt"));
    out = new FastWriter(new File("output.txt"));

    int n = in.nextInt();
    int m = in.nextInt();

    char a = 'B';
    char b = 'G';
    if (m > n) {
      a = 'G';
      b = 'B';
      int t = m;
      m = n;
      n = t;
    }

    while (m != 0) {
      out.printf("%c", a);
      out.printf("%c", b);
      n--;
      m--;
    }
    while (n != 0) {
      out.printf("%c", a);
      n--;
    }
    out.println();
    out.close();
  }

  static class FastScanner {
    BufferedReader br;
    StringTokenizer st;

    public FastScanner(InputStream in) {
      br = new BufferedReader(new InputStreamReader(in));
      st = new StringTokenizer("");
    }

    public FastScanner(File f) throws IOException {
      br = new BufferedReader(new FileReader(f));
      st = new StringTokenizer("");
    }

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

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

    public double nextDouble() throws IOException {
      return Double.parseDouble(next());
    }

    public String next() throws IOException {
      if (st.hasMoreTokens()) return st.nextToken();
      st = new StringTokenizer(br.readLine());
      return next();
    }
  }

  static class FastWriter extends PrintWriter {
    public FastWriter(OutputStream out) throws IOException {
      super(new BufferedWriter(new OutputStreamWriter(out)));
    }

    public FastWriter(File f) throws IOException {
      super(new BufferedWriter(new FileWriter(f)));
    }
  }
}


import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;

public class PlayGround {

	public static void main(String[] args) throws Exception {
		Eduardo();

	}

	public static void Eduardo() throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(input.txt));
		String input = br.readLine();
		String[] inputArray = input.split(" ");
		int boy = Integer.parseInt(inputArray[0]);
		int girl = Integer.parseInt(inputArray[1]);
		StringBuilder sb = new StringBuilder();
		int total = boy+girl;
		if (boy>girl){
			int difference = boy-girl;
			for(int i =0; i<difference; i++){
				sb.append("B");
			}
			for(int i =1; i<total/2; i++){
				sb.append("BG");
			}
		}
		else if(girl>boy){
			int difference = girl-boy;
			for(int i =0; i<difference; i++){
				sb.append("G");
			}
			for(int i =1; i<total/2; i++){
				sb.append("BG");
			}
		}
		else{
			for(int i =0; i<total/2; i++){
				sb.append("BG");
			}
		}
		out.println(sb);

	}
}


import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;

public class PlayGround {

	public static void main(String[] args) throws Exception {
		Eduardo();

	}

	public static void Eduardo() throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input = br.readLine();
		String[] inputArray = input.split(" ");
		int boy = Integer.parseInt(inputArray[0]);
		int girl = Integer.parseInt(inputArray[1]);
		StringBuilder sb = new StringBuilder();
		int total = boy+girl;
		if (boy>girl){
			int difference = boy-girl;
			for(int i =0; i<difference; i++){
				sb.append("B");
			}
			for(int i =1; i<total/2; i++){
				sb.append("BG");
			}
		}
		else if(girl>boy){
			int difference = girl-boy;
			for(int i =0; i<difference; i++){
				sb.append("G");
			}
			for(int i =1; i<total/2; i++){
				sb.append("BG");
			}
		}
		else{
			for(int i =0; i<total/2; i++){
				sb.append("BG");
			}
		}
		System.out.println(sb);

	}
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class InputOutputCode {

public static void main(String[] args) {

        try {

            File file = new File("input.txt");
            InputStream input = System.in;
            OutputStream output = System.out;
            if (file.canRead()) {
                input = (new FileInputStream(file));
                output = (new PrintStream("output.txt"));
            }
            br = new BufferedReader(new InputStreamReader(input));
            out = new PrintWriter(output);
            Eduardo();
            out.close();
            br.close();
        } catch (Throwable e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

static BufferedReader br;
static StringTokenizer st;
static PrintWriter out;
	public static void Eduardo() throws IOException{

		String input = br.readLine();
		String[] inputArray = input.split(" ");
		int boy = Integer.parseInt(inputArray[0]);
		int girl = Integer.parseInt(inputArray[1]);
		int total = boy+girl;
		if (boy>girl){
			int difference = boy-girl;
			for(int i =0; i<girl; i++){
				out.print("BG");
			}
			for(int i =0; i<difference; i++){
				out.print("B");
			}

		}
		else if(girl>boy){
			int difference = girl-boy;
			for(int i =0; i<boy; i++){
				out.print("GB");
			}
			for(int i =0; i<difference; i++){
			    out.print("G");
			}

		}
		else{
			for(int i =0; i<total/2; i++){
				out.print("BG");
			}
		}

	}
}


import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;

public class PlayGround {

public static void main(String[] args) {
        try {
            File file = new File("input.txt");
            InputStream input = System.in;
            OutputStream output = System.out;
            if (file.canRead()) {
                input = (new FileInputStream(file));
                output = (new PrintStream("output.txt"));
            }
            out = new PrintWriter(output);
            Eduardo();
            out.close();
            br.close();
        } catch (Throwable e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

	public static void Eduardo() throws IOException{

        br = new BufferedReader(new InputStreamReader(input));
		String input = br.readLine();
		String[] inputArray = input.split(" ");
		int boy = Integer.parseInt(inputArray[0]);
		int girl = Integer.parseInt(inputArray[1]);
		int total = boy+girl;
		if (boy>girl){
			int difference = boy-girl;
			for(int i =0; i<difference; i++){
				out.print("B");
			}
			for(int i =1; i<total/2; i++){
				out.print("BG");
			}
		}
		else if(girl>boy){
			int difference = girl-boy;
			for(int i =0; i<difference; i++){
			    out.print("G");
			}
			for(int i =1; i<total/2; i++){
				out.print("BG");
			}
		}
		else{
			for(int i =0; i<total/2; i++){
				out.print("BG");
			}
		}

	}
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class InputOutputCode {

public static void main(String[] args) {

        try {

            File file = new File("input.txt");
            InputStream input = System.in;
            OutputStream output = System.out;
            if (file.canRead()) {
                input = (new FileInputStream(file));
                output = (new PrintStream("output.txt"));
            }
            br = new BufferedReader(new InputStreamReader(input));
            out = new PrintWriter(output);
            Eduardo();
            out.close();
            br.close();
        } catch (Throwable e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

static BufferedReader br;
static StringTokenizer st;
static PrintWriter out;
	public static void Eduardo() throws IOException{

		String input = br.readLine();
		String[] inputArray = input.split(" ");
		int boy = Integer.parseInt(inputArray[0]);
		int girl = Integer.parseInt(inputArray[1]);
		int total = boy+girl;
		if (boy>girl){
			int difference = boy-girl;
			for(int i =0; i<girl; i++){
				out.print("BG");
			}
			for(int i =0; i<difference; i++){
				out.print("B");
			}

		}
		else if(girl>boy){
			int difference = girl-boy;
			for(int i =0; i<boy; i++){
				out.print("BG");
			}
			for(int i =0; i<difference; i++){
			    out.print("G");
			}

		}
		else{
			for(int i =0; i<total/2; i++){
				out.print("BG");
			}
		}

	}
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class InputOutputCode {

public static void main(String[] args) {

        try {

            File file = new File("input.txt");
            InputStream input = System.in;
            OutputStream output = System.out;
            if (file.canRead()) {
                input = (new FileInputStream(file));
                output = (new PrintStream("output.txt"));
            }
            br = new BufferedReader(new InputStreamReader(input));
            out = new PrintWriter(output);
            Eduardo();
            out.close();
            br.close();
        } catch (Throwable e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

static BufferedReader br;
static StringTokenizer st;
static PrintWriter out;
	public static void Eduardo() throws IOException{

		String input = br.readLine();
		String[] inputArray = input.split(" ");
		int boy = Integer.parseInt(inputArray[0]);
		int girl = Integer.parseInt(inputArray[1]);
		int total = boy+girl;
		if (boy>girl){
			int difference = boy-girl;
			for(int i =1; i<girl; i++){
				out.print("BG");
			}
			for(int i =0; i<difference; i++){
				out.print("B");
			}

		}
		else if(girl>boy){
			int difference = girl-boy;
			for(int i =1; i<boy; i++){
				out.print("BG");
			}
			for(int i =0; i<difference; i++){
			    out.print("G");
			}

		}
		else{
			for(int i =0; i<total/2; i++){
				out.print("BG");
			}
		}

	}
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class InputOutputCode {

public static void main(String[] args) {

        try {

            File file = new File("input.txt");
            InputStream input = System.in;
            OutputStream output = System.out;
            if (file.canRead()) {
                input = (new FileInputStream(file));
                output = (new PrintStream("output.txt"));
            }
            br = new BufferedReader(new InputStreamReader(input));
            out = new PrintWriter(output);
            Eduardo();
            out.close();
            br.close();
        } catch (Throwable e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

static BufferedReader br;
static StringTokenizer st;
static PrintWriter out;
	public static void Eduardo() throws IOException{

		String input = br.readLine();
		String[] inputArray = input.split(" ");
		int boy = Integer.parseInt(inputArray[0]);
		int girl = Integer.parseInt(inputArray[1]);
		int total = boy+girl;
		if (boy>girl){
			int difference = boy-girl;
			for(int i =0; i<difference; i++){
				out.print("B");
			}
			for(int i =1; i<total/2; i++){
				out.print("BG");
			}
		}
		else if(girl>boy){
			int difference = girl-boy;
			for(int i =0; i<difference; i++){
			    out.print("G");
			}
			for(int i =1; i<total/2; i++){
				out.print("BG");
			}
		}
		else{
			for(int i =0; i<total/2; i++){
				out.print("BG");
			}
		}

	}
}


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class InputOutputCode {

public static void main(String[] args) {

        try {

            File file = new File("input.txt");
            InputStream input = System.in;
            OutputStream output = System.out;
            if (file.canRead()) {
                input = (new FileInputStream(file));
                output = (new PrintStream("output.txt"));
            }
            br = new BufferedReader(new InputStreamReader(input));
            out = new PrintWriter(output);
            Eduardo();
            out.close();
            br.close();
        } catch (Throwable e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

static BufferedReader br;
static StringTokenizer st;
static PrintWriter out;
	public static void Eduardo() throws IOException{

		String input = br.readLine();
		String[] inputArray = input.split(" ");
		int boy = Integer.parseInt(inputArray[0]);
		int girl = Integer.parseInt(inputArray[1]);
		int total = boy+girl;
		if (boy>girl){
			int difference = boy-girl;
			for(int i =1; i<total/2; i++){
				out.print("BG");
			}
			for(int i =0; i<difference; i++){
				out.print("B");
			}

		}
		else if(girl>boy){
			int difference = girl-boy;
			for(int i =1; i<total/2; i++){
				out.print("BG");
			}
			for(int i =0; i<difference; i++){
			    out.print("G");
			}

		}
		else{
			for(int i =0; i<total/2; i++){
				out.print("BG");
			}
		}

	}
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
	public static void main(String[] args) throws IOException {
		Task task = new Task();
		task.getData();
		task.solve();
		task.printAnswer();
	}
}

class Task {
	int n, m;

	StringBuilder answer = new StringBuilder();

	public void getData() throws IOException {
		//BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedReader br = new BufferedReader(new FileReader("input.txt"));

		String[] data = br.readLine().split(" ");
		n = Integer.parseInt(data[0]);
		m = Integer.parseInt(data[1]);

		br.close();
	}

	public void solve() {
		String dominant = (n > m ? "B" : "G");
		String recessive = (n > m ? "G" : "B");

		for (int i = 0; i < Math.min(n, m); ++i) {
			answer.append(dominant + recessive);
		}
		for (int i = 0; i < Math.max(n, m) - Math.min(n, m); ++i) {
			answer.append(dominant);
		}
	}

	public void printAnswer() throws IOException {
		//System.out.print(answer);
		FileWriter fw = new FileWriter(new File("output.txt"));
		BufferedWriter bw = new BufferedWriter(fw);
		bw.append(answer);
		bw.close();
	}
}

class Team {
	int solved;
	int totalTime;

	Team(int solved, int totalTime) {
		this.solved = solved;
		this.totalTime = totalTime;
	}

	int compareTo(Team two) {
		if (solved == two.solved && totalTime == two.totalTime) {
			return 0;
		}
		if (solved > two.solved || solved == two.solved
				&& totalTime < two.totalTime) {
			return -1;
		}

		return 1;
	}

	@Override
	public boolean equals(Object o) {
		return (o instanceof Team) && compareTo((Team) o) == 0;
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
	public static void main(String[] args) throws IOException {
		Task task = new Task();
		task.getData();
		task.solve();
		task.printAnswer();
	}
}

class Task {
	int n, m;

	StringBuilder answer = new StringBuilder();

	public void getData() throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] data = br.readLine().split(" ");
		n = Integer.parseInt(data[0]);
		m = Integer.parseInt(data[1]);
	}

	public void solve() {
		String dominant = (n > m ? "B" : "G");
		String recessive = (n > m ? "G" : "B");

		for (int i = 0; i < Math.min(n, m); ++i) {
			answer.append(dominant + recessive);
		}
		for (int i = 0; i < Math.max(n, m) - Math.min(n, m); ++i) {
			answer.append(dominant);
		}
	}

	public void printAnswer() {
		System.out.print(answer);
	}
}

class Team {
	int solved;
	int totalTime;

	Team(int solved, int totalTime) {
		this.solved = solved;
		this.totalTime = totalTime;
	}

	int compareTo(Team two) {
		if (solved == two.solved && totalTime == two.totalTime) {
			return 0;
		}
		if (solved > two.solved || solved == two.solved
				&& totalTime < two.totalTime) {
			return -1;
		}

		return 1;
	}

	@Override
	public boolean equals(Object o) {
		return (o instanceof Team) && compareTo((Team) o) == 0;
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
	public static void main(String[] args) throws IOException {
		Task task = new Task();
		task.getData();
		task.solve();
		task.printAnswer();
	}
}

class Task {
	int n, m;

	StringBuilder answer = new StringBuilder();

	public void getData() throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] data = br.readLine().split(" ");
		n = Integer.parseInt(data[0]);
		m = Integer.parseInt(data[1]);
	}

	public void solve() {
		/*
		String dominant = (n > m ? "B" : "G");
		String recessive = (n > m ? "G" : "B");

		for (int i = 0; i < Math.min(n, m); ++i) {
			answer.append(dominant + recessive);
		}
		for (int i = 0; i < Math.max(n, m) - Math.min(n, m); ++i) {
			answer.append(dominant);
		}*/
		answer.append("GBGBGB");
	}

	public void printAnswer() {
		System.out.print(answer);
	}
}

class Team {
	int solved;
	int totalTime;

	Team(int solved, int totalTime) {
		this.solved = solved;
		this.totalTime = totalTime;
	}

	int compareTo(Team two) {
		if (solved == two.solved && totalTime == two.totalTime) {
			return 0;
		}
		if (solved > two.solved || solved == two.solved
				&& totalTime < two.totalTime) {
			return -1;
		}

		return 1;
	}

	@Override
	public boolean equals(Object o) {
		return (o instanceof Team) && compareTo((Team) o) == 0;
	}
}


import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 *
 * @author Gitesh
 */
public class December {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws FileNotFoundException {
        // TODO code application logic here
        Scanner sc = new Scanner(new File("input.txt"));
        PrintWriter out = new PrintWriter(new File("output.txt"));

        // System.out.println(sc.next());
        int n = sc.nextInt();
        int m = sc.nextInt();
        sc.close();

        String ans="";

        if(n>m)
        {n-=m;
        while(m-->0)
            ans+="BG";
        while(n-->0)
            ans+="B";
        }
        else
        {m-=n;
        while(n-->0)
            ans+="GB";
        while(m-->0)
            ans+="G";}

    out.print(ans);
    out.close();
}
}


import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 *
 * @author mina
 */
public class A {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws FileNotFoundException {
        boolean gender = false; //false==boy
        Scanner sc = new Scanner(new File("input.txt"));
        int n = sc.nextInt(); //number of girls
        int m = sc.nextInt(); //number of boys
        int i = n, remain = -1;
        String s = "GB";
        if (m > n) {
            i = n;
            gender = true;
            remain = m - n;
        } else if (n > m) {
            i = m;
            remain = n - m;
        }
        for (; i > 1; i--) {
            s = s.concat("GB");
        }

        for (; remain > 0; remain--) {
            if (gender) {
                s = s.concat("G");
            } else {
                s = s.concat("B");
            }

        }
        PrintWriter pw1 = new PrintWriter("output.txt");
        pw1.println(s);
        pw1.flush();
        pw1.close();
    }

}


import java.util.Scanner;

/**
 *
 * @author mina
 */
public class A {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        boolean gender = false; //false==boy
        Scanner sc = new Scanner(System.in);
        int m = sc.nextInt(); //number of girls
        int n = sc.nextInt(); //number of boys
        String p = "GB";
        int i = n, remain = -1;
        if (m > n) {
            i = n;
            gender = true;
            remain = m - n;
        } else if (n > m) {
            i = m;
            remain = n - m;
        }

        for (; i > 1; i--) {
           p= p.concat("GB");
        }

        for (; remain > 0; remain--) {
            if (gender) {
             p=   p.concat("G");
            } else {
               p= p.concat("B");
            }

        }
                   System.out.print(p);

    }

}


import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 *
 * @author mina
 */
public class A {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws FileNotFoundException {
        boolean gender = false; //false==boy
        Scanner sc = new Scanner(new File("input.txt"));

        int n = sc.nextInt(); //number of girls
        int m = sc.nextInt(); //number of boys
        int i = n, remain = -1;
        String s = " ";
        if (m > n) {
            s="GB";
            for (; i > 1; i--) {
                s = s.concat("GB");
            }
            gender = true;
            remain = m - n;
        } else if (n > m) {
            i = m;
            s="BG";
            for (; i > 1; i--) {
                s = s.concat("BG");
            }
            remain = n - m;
        }else if(m==n){
            s="GB";
 for (; i > 1; i--) {
                s = s.concat("GB");
            }
        }
        for (; remain > 0; remain--) {
            if (gender) {
                s = s.concat("G");
            } else {
                s = s.concat("B");
            }

        }
        PrintWriter pw1 = new PrintWriter("output.txt");
        pw1.println(s);
        pw1.flush();
        pw1.close();
    }

}


import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 *
 * @author mina
 */
public class A {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws FileNotFoundException {
        boolean gender = false; //false==boy
        Scanner sc = new Scanner(new File("input.txt"));

        int n = sc.nextInt(); //number of girls
        int m = sc.nextInt(); //number of boys
        int i = n, remain = -1;
        String s = " ";
        if (m > n) {
            s="GB";
            for (; i > 1; i--) {
                s = s.concat("GB");
            }
            gender = true;
            remain = m - n;
        } else if (n > m) {
            i = m;
            s="BG";
            for (; i > 1; i--) {
                s = s.concat("BG");
            }
            remain = n - m;
        }

        for (; remain > 0; remain--) {
            if (gender) {
                s = s.concat("G");
            } else {
                s = s.concat("B");
            }

        }

        PrintWriter pw1 = new PrintWriter("output.txt");
        pw1.println(s);
        pw1.flush();
        pw1.close();
    }

}


import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 *
 * @author mina
 */
public class A {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws FileNotFoundException {
        boolean gender = false; //false==boy
        Scanner sc = new Scanner(new File("input.txt"));

        int n = sc.nextInt(); //number of girls
        int m = sc.nextInt(); //number of boys
        int i = n, remain = -1;
        String s = " ";
        if (m > n) {
            s="GB";
            for (; i > 1; i--) {
                s = s.concat("GB");
            }
            gender = true;
            remain = m - n;
        } else if (n > m) {
            i = m;
            s="BG";
            for (; i > 1; i--) {
                s = s.concat("BG");
            }
            remain = n - m;
        }
 for (; i > 1; i--) {
                s = s.concat("GB");
            }
        for (; remain > 0; remain--) {
            if (gender) {
                s = s.concat("G");
            } else {
                s = s.concat("B");
            }

        }

        PrintWriter pw1 = new PrintWriter("output.txt");
        pw1.println(s);
        pw1.flush();
        pw1.close();
    }

}


import java.util.Scanner;

/**
 *
 * @author mina
 */
public class A {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        boolean gender = false; //false==boy
        Scanner sc = new Scanner(System.in);
        int m = sc.nextInt(); //number of girls
        int n = sc.nextInt(); //number of boys
        int i = n, remain = -1;
        if (m > n) {
            i = n;
            gender = true;
            remain = m - n;
        } else if(n>m){
            i = m;
            remain = n - m;
        }
        for (; i > 0; i--) {
            System.out.print("GB");
        }

        for (; remain > 0; remain--) {
            if (gender) {
                System.out.print("G");
            } else {
                System.out.print("B");
            }

        }
    }

}


import java.util.Scanner;

/**
 *
 * @author mina
 */
public class Con3_2 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
   Scanner sc = new Scanner(System.in);
   int n= sc.nextInt();
   int m = sc.nextInt();
   if (m>=n)
   {          System.out.println(n*m-(n-1)*n/2);

   for (int i = 1; i <= n; i++) {
           int j=i;
            for (; j <= m; j++) {
                System.out.println(i + " " + j);
            }
        }
   }
   else {
       System.out.println(m*m-(m-1)*m/2 + (n-m)*m);
   int[][] bg = new int[2][m*m-(m-1)*m/2 + (n-m)*m];

       for (int i = 1; i <= m; i++) {
           for (int j = 1; j <= n; j++) {
               bg[0][j-1]=i;
               bg[1][j-1]=j;
           }
       }
       int temp=0,temp1=0,j=1;
       for (int i = 0; i <bg[0].length; i++) {
             for (;j < bg[0].length; j++) {
            if (bg[0][i] > bg[0][j]) {
                temp = bg[0][i];
             temp1 = bg[1][i];
            bg[0][i] = bg[0][j];
            bg[1][i] = bg[1][j];
            bg[0][j]=temp;
             bg[1][j]=temp1;
            }

            }
   }
         for (int i = 0; i < bg[0].length; i++) {
            System.out.print(bg[0][i] + " ");
            System.out.println(bg[1][i]);
        }
   }

    }
    }


import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;

import java.util.Scanner;

/**
 *
 * @author mina
 */
public class A {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws FileNotFoundException {
        boolean gender = false; //false==boy
        Scanner sc = new Scanner(new File("input.txt"));
        int n = sc.nextInt(); //number of girls
        int m = sc.nextInt(); //number of boys
        int i = n, remain = -1;
        String s = "GB";
        if (m > n) {
            i = n;
            gender = true;
            remain = m - n;
        } else if (n > m) {
            i = m;
            remain = n - m;
        }
        for (; i > 1; i--) {
            s = s.concat("GB");
        }

        for (; remain > 0; remain--) {
            if (gender) {
                s = s.concat("G");
            } else {
                s = s.concat("B");
            }

        }
        PrintWriter pw = new PrintWriter("output.txt");
        pw.println(s);
        pw.flush();
        pw.close();
    }

}


import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;

import java.util.Scanner;

/**
 *
 * @author mina
 */
public class A {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws FileNotFoundException {
        boolean gender = false; //false==boy
        Scanner sc = new Scanner(new File("input.txt"));
        int m = sc.nextInt(); //number of girls
        int n = sc.nextInt(); //number of boys
        int i = n, remain = -1;
        String s = "GB";
        if (m > n) {
            i = n;
            gender = true;
            remain = m - n;
        } else if (n > m) {
            i = m;
            remain = n - m;
        }
        for (; i > 1; i--) {
            s = s.concat("GB");
        }

        for (; remain > 0; remain--) {
            if (gender) {
                s = s.concat("G");
            } else {
                s = s.concat("B");
            }

        }
        PrintWriter pw = new PrintWriter("output.txt");
        pw.println(s);
        pw.flush();
        pw.close();
    }

}


import java.io.*;    //PrintWriter
import java.math.*;  //BigInteger, BigDecimal
import java.util.*;  //StringTokenizer, ArrayList

public class R154_Div2_A
{
	FastReader in;
	PrintWriter out;

	public static void main(String[] args)  {
		new R154_Div2_A().runWithFiles();
	}

	void run()
	{
		in = new FastReader(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	void runWithFiles() {
		//in = new FastReader(new File("src/input.txt"));
		in = new FastReader(new File("input.txt"));
		try {
			//out = new PrintWriter(new File("src/output.txt"));
			out = new PrintWriter(new File("output.txt"));
		}
		catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		solve();
		out.close();
	}

	void solve()
	{
		int n = in.nextInt();
		int m = in.nextInt();

        int min = Math.min(n, m);
        String st = "";
        if (n == min)
        {
            for (int i = 0; i < min; i++)
                st += "GB";
            for (int i = 0; i < m - min; i++)
                st += "G";
        }
        else
        {
            for (int i = 0; i < min; i++)
                st += "BG";
            for (int i = 0; i < n - min; i++)
                st += "B";
        }

        out.println(st);
        System.out.println(st);

	}

	//-----------------------------------------------------

	class FastReader
	{
	    BufferedReader br;
	    StringTokenizer tokenizer;

	    public FastReader(InputStream stream)
	    {
	        br = new BufferedReader(new InputStreamReader(stream));
	        tokenizer = null;
	    }
		public FastReader(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
				tokenizer = null;
			}
			catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

	    private String next() {
	        while (tokenizer == null || !tokenizer.hasMoreTokens())
	            try {
	            	tokenizer = new StringTokenizer(br.readLine());
	            }
	            catch (IOException e) {
	                throw new RuntimeException(e);
	            }
	        return tokenizer.nextToken();
	    }
		public String nextLine() {
			try	{
				return br.readLine();
			}
			catch(Exception e) {
				throw(new RuntimeException());
			}
		}

	    int nextInt() {
	        return Integer.parseInt(next());
	    }
	    long nextLong() {
	        return Long.parseLong(next());
	    }
	    double nextDouble() {
	        return Double.parseDouble(next());
	    }
	    BigInteger nextBigInteger() {
	        return new BigInteger(next());
	    }
	    BigDecimal nextBigDecimal() {
	        return new BigDecimal(next());
	    }
	}
}


import java.util.Scanner;

public class Prob253A
{
    public static void main( String[] Args )
    {
        Scanner scan = new Scanner( System.in );
        int b = scan.nextInt();
        int g = scan.nextInt();
        if (b > g)
        {
        	for (int i = 0; i < g; i++)
        		System.out.print("BG");
        	for (int i = g; i < b; i++)
        		System.out.print("B");
        }
        else
        {
        	for (int i = 0; i < g; i++)
        		System.out.print("GB");
        	for (int i = g; i < b; i++)
        		System.out.print("G");
        }
        System.out.println();
    }
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Prob253A {
	public static void main(String[] Args) throws IOException {
		BufferedReader in = new BufferedReader(new FileReader("input.txt"));
		PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(
				"output.txt")));
		StringTokenizer s = new StringTokenizer(in.readLine());

		int b = Integer.parseInt(s.nextToken());
		int g = Integer.parseInt(s.nextToken());
		if (b > g) {
			for (int i = 0; i < g; i++)
				out.print("BG");
			for (int i = g; i < b; i++)
				out.print("B");
		} else {
			for (int i = 0; i < b; i++)
				out.print("GB");
			for (int i = b; i < g; i++)
				out.print("G");
		}

		out.println();
		out.close();
	}
}


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Prob253A {
	public static void main(String[] Args) throws IOException {
		BufferedReader in = new BufferedReader(new FileReader("input.txt"));
		PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(
				"output.txt")));
		StringTokenizer s = new StringTokenizer(in.readLine());

		int b = Integer.parseInt(s.nextToken());
		int g = Integer.parseInt(s.nextToken());
		if (b > g) {
			for (int i = 0; i < g; i++)
				out.print("BG");
			for (int i = g; i < b; i++)
				out.print("B");
		} else {
			for (int i = 0; i < g; i++)
				out.print("GB");
			for (int i = g; i < b; i++)
				out.print("G");
		}

		out.println();
		out.close();
	}
}


import java.util.*;
import java.io.*;
import java.lang.*;

public class TaskA {
	public static void main(String[] args) throws FileNotFoundException {
		Scanner in = new Scanner(new FileInputStream("input.txt"));
		PrintWriter out = new PrintWriter(new FileOutputStream("output.txt"));
		TaskA solver = new TaskA();
		solver.solve(in, out);
		in.close();
		out.close();
	}
	private void solve(Scanner in, PrintWriter out) {
		int boysCount = in.nextInt();
		int girlsCount = in.nextInt();
		if (girlsCount > boysCount) {
			for (int i = 0; i < boysCount; ++i)
				out.print("GB");
			for (int i = 0; i < girlsCount - boysCount; ++i)
				out.print("G");
		} else {
			for (int i = 0; i < girlsCount; ++i)
				out.print("BG");
			for (int i = 0; i < boysCount - girlsCount; ++i)
				out.print("B");
		}
	}
}


import java.util.*;
import java.io.*;
import java.lang.*;

public class TaskA {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		TaskA solver = new TaskA();
		solver.solve(in, out);
		in.close();
		out.close();
	}
	private void solve(Scanner in, PrintWriter out) {
		int boysCount = in.nextInt();
		int girlsCount = in.nextInt();
		if (girlsCount > boysCount) {
			for (int i = 0; i < boysCount; ++i)
				out.print("GB");
			for (int i = 0; i < girlsCount - boysCount; ++i)
				out.print("G");
		} else {
			for (int i = 0; i < girlsCount; ++i)
				out.print("BG");
			for (int i = 0; i < boysCount - girlsCount; ++i)
				out.print("B");
		}
	}
}


import java.util.*;
import java.io.*;
import java.lang.*;

public class TaskA {
	public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner(new FileInputStream("input.txt"));
        PrintWriter out = new PrintWriter(new FileOutputStream("output.txt"));
		TaskA solver = new TaskA();
		solver.solve(in, out);
		in.close();
		out.close();
	}
	private void solve(Scanner in, PrintWriter out) {
		int boysCount = in.nextInt();
		int girlsCount = in.nextInt();
		if (girlsCount > boysCount) {
			for (int i = 0; i < boysCount; ++i)
				out.print("GB");
			for (int i = 0; i < girlsCount - boysCount; ++i)
				out.print("G");
		} else {
			for (int i = 0; i < girlsCount; ++i)
				out.print("BG");
			for (int i = 0; i < boysCount - girlsCount; ++i)
				out.print("B");
		}
	}
}


import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.util.*;
public class yo {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(new File("input.txt"));
        PrintStream out = new PrintStream (new File("output.txt"));
        StringBuffer sb = new StringBuffer ();
        int a = scan.nextInt(), b = scan.nextInt();
        if(a==b){
            for(int i = 0; i < a; i ++){
                sb.append("BG");
            }
        }else if (a>b) {
            for(int i = 0; i < b; i ++){
                sb.append("BG");
            }
            for(int i = 0; i < (a-b); i ++)
                sb.append("B");
        }else {
            for(int i = 0; i < a; i ++){
                sb.append("GB");
            }

            for(int i = 0; i < (b-a); i ++)
                sb.append("G");
        }
        out.print(sb.toString());
        out.close();
    }
}


import java.util.*;
public class yo {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt(), b = scan.nextInt();
        boolean trigger = true;
        if(a==b){
            for(int i = 0; i < a*2; i ++){
                if(trigger){
                    System.out.print("B");
                    trigger = false;
                }else {
                    System.out.print("G");
                    trigger = true;
                }
            }
        }else if (a>b) {
            for(int i = 0; i < b*2; i ++){
                if(trigger){
                    System.out.print("B");
                    trigger = false;
                }else {
                    System.out.print("G");
                    trigger = true;
                }
            }
            for(int i = 0; i < (a-b); i ++)
                System.out.print("B");
        }else {
            for(int i = 0; i < a*2; i ++){
                if(trigger){
                    System.out.print("G");
                    trigger = false;
                }else {
                    System.out.print("B");
                    trigger = true;
                }
            }

            for(int i = 0; i < (b-a); i ++)
                System.out.print("G");
        }
    }
}


public class yo {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt(), b = scan.nextInt();
        boolean trigger = true;
        if(a==b){
            for(int i = 0; i < a*2; i ++){
                if(trigger){
                    System.out.print("B");
                    trigger = false;
                }else {
                    System.out.print("G");
                    trigger = true;
                }
            }
        }else if (a>b) {
            for(int i = 0; i < b*2; i ++){
                if(trigger){
                    System.out.print("B");
                    trigger = false;
                }else {
                    System.out.print("G");
                    trigger = true;
                }
            }
            for(int i = 0; i < (a-b); i ++)
                System.out.print("B");
        }else {
            for(int i = 0; i < a*2; i ++){
                if(trigger){
                    System.out.print("G");
                    trigger = false;
                }else {
                    System.out.print("B");
                    trigger = true;
                }
            }

            for(int i = 0; i < (b-a); i ++)
                System.out.print("G");
        }
    }
}


import java.util.*;
import java.util.Map.Entry;

import org.ietf.jgss.Oid;

import sun.tools.jar.resources.jar;

public class yo {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt(), b = scan.nextInt();
        boolean trigger = true;
        if(a==b){
            for(int i = 0; i < a*2; i ++){
                if(trigger){
                    System.out.print("G");
                    trigger = false;
                }else {
                    System.out.print("B");
                    trigger = true;
                }
            }
        }else if (a>b) {
            for(int i = 0; i < b*2; i ++){
                if(trigger){
                    System.out.print("B");
                    trigger = false;
                }else {
                    System.out.print("G");
                    trigger = true;
                }
            }
            for(int i = 0; i < (a-b); i ++)
                System.out.print("B");
        }else {
            for(int i = 0; i < a*2; i ++){
                if(trigger){
                    System.out.print("G");
                    trigger = false;
                }else {
                    System.out.print("B");
                    trigger = true;
                }
            }

            for(int i = 0; i < (b-a); i ++)
                System.out.print("G");
        }
    }
}


import java.util.Arrays;
import java.util.Scanner;
public class Sale64B {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt(), m = scan.nextInt();
        System.out.println("BGBGBG");
    }
}


import java.util.Arrays;
import java.util.Scanner;

public class Sale64B {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt(), b = scan.nextInt();
        boolean trigger = true;
        if(a==b){
            for(int i = 0; i < a*2; i ++){
                if(trigger){
                    System.out.print("B");
                    trigger = false;
                }else {
                    System.out.print("G");
                    trigger = true;
                }
            }
        }else if (a>b) {
            for(int i = 0; i < b*2; i ++){
                if(trigger){
                    System.out.print("B");
                    trigger = false;
                }else {
                    System.out.print("G");
                    trigger = true;
                }
            }
            for(int i = 0; i < (a-b); i ++)
                System.out.print("B");
        }else {
            for(int i = 0; i < a*2; i ++){
                if(trigger){
                    System.out.print("G");
                    trigger = false;
                }else {
                    System.out.print("B");
                    trigger = true;
                }
            }

            for(int i = 0; i < (b-a); i ++)
                System.out.print("G");
        }

    }
}


import java.util.*;
import java.util.Map.Entry;

import org.ietf.jgss.Oid;

import sun.tools.jar.resources.jar;

public class yo {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt(), b = scan.nextInt();
        boolean trigger = true;
        if(a==b){
            for(int i = 0; i < a*2; i ++){
                if(trigger){
                    System.out.print("G");
                    trigger = false;
                }else {
                    System.out.print("B");
                    trigger = true;
                }
            }
        }else if (a>b) {
            for(int i = 0; i < b*2; i ++){
                if(trigger){
                    System.out.print("B");
                    trigger = false;
                }else {
                    System.out.print("G");
                    trigger = true;
                }
            }
            for(int i = 0; i < (a-b); i ++)
                System.out.print("B");
        }else {
            for(int i = 0; i < a*2; i ++){
                if(trigger){
                    System.out.print("G");
                    trigger = false;
                }else {
                    System.out.print("B");
                    trigger = true;
                }
            }
            for(int i = 0; i < (b-a); i ++)
                System.out.print("G");
        }
    }
}


import java.util.Arrays;
import java.util.Scanner;

public class Sale64B {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt(), b = scan.nextInt();
        if(a==b){
            for(int i = 0; i < a; i ++){
                System.out.print("BG");
            }
        }else if (a>b) {
            for(int i = 0; i < b; i ++){
                System.out.print("BG");
            }
            for(int i = 0; i < (a-b); i ++)
                System.out.print("B");
        }else {
            for(int i = 0; i < a; i ++){
                System.out.print("GB");
            }

            for(int i = 0; i < (b-a); i ++)
                System.out.print("G");
        }

    }
}


import java.util.*;
import java.util.Map.Entry;

import org.ietf.jgss.Oid;

import sun.tools.jar.resources.jar;

public class yo {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt(), b = scan.nextInt();
        boolean trigger = true;
        if(a==b){
            for(int i = 0; i < a*2; i ++){
                if(trigger){
                    System.out.print("B");
                    trigger = false;
                }else {
                    System.out.print("G");
                    trigger = true;
                }
            }
        }else if (a>b) {
            for(int i = 0; i < b*2; i ++){
                if(trigger){
                    System.out.print("B");
                    trigger = false;
                }else {
                    System.out.print("G");
                    trigger = true;
                }
            }
            for(int i = 0; i < (a-b); i ++)
                System.out.print("B");
        }else {
            for(int i = 0; i < a*2; i ++){
                if(trigger){
                    System.out.print("G");
                    trigger = false;
                }else {
                    System.out.print("B");
                    trigger = true;
                }
            }

            for(int i = 0; i < (b-a); i ++)
                System.out.print("G");
        }
    }
}


import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws FileNotFoundException {
        Scanner sc = new Scanner(new File("input.txt"));
        PrintWriter out = new PrintWriter(new File("output.txt"));

        int n = sc.nextInt();
        int m = sc.nextInt();

        boolean first = (n > m) ? true : false;

        while(n > 0 || m > 0)
        {
            if(first)
            {
                if(n > 0)
                {
                    out.print('B');
                    n--;
                }
                if(m > 0)
                {
                    out.print('G');
                    m--;
                }
            }
            else
            {
                if(m > 0)
                {
                    out.print('G');
                    m--;
                }
                if(n > 0)
                {
                    out.print('B');
                    n--;
                }
            }
        }

        out.flush();
    }
}


import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = sc.nextInt();
        int m = sc.nextInt();

        boolean first = n > m;

        while(n > 0 || m > 0)
        {
            if(first)
            {
                if(n > 0)
                {
                    out.print('B');
                    n--;
                }
                if(m > 0)
                {
                    out.print('G');
                    m--;
                }
            }
            else
            {
                if(m > 0)
                {
                    out.print('G');
                    m--;
                }
                if(n > 0)
                {
                    out.print('B');
                    n--;
                }
            }
        }

        out.flush();
    }
}


import java.util.*;

public class _253A_Boys_and_Girls {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int b = in.nextInt();
        int g = in.nextInt();
        System.out.println("GBGBGB");
        String s = b > g ? "BG" : "GB";
        int n = Math.min(g, b);
        for (int i = 0; i < n; i++)
            System.out.print(s);
        s = b > g ? "B" : "G";
        n = Math.max(g, b) - n;
        for (int i = 0; i < n; i++)
            System.out.print(s);
        System.out.println();
    }
}


import java.util.*;

public class _253A_Boys_and_Girls {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int b = in.nextInt();
		int g = in.nextInt();
		String s = b > g ? "BG" : "GB";
		int n = Math.min(g, b);
		for (int i = 0; i < n; i++)
			System.out.print(s);
		s = b > g ? "B" : "G";
		n = Math.max(g, b) - n;
		for (int i = 0; i < n; i++)
			System.out.print(s);
	}
}


import java.io.*;
import java.util.*;

public class _253A_Boys_and_Girls {
    public static void main(String[] args) throws FileNotFoundException {
        Scanner in = new Scanner(new File("input.txt"));
        int b = in.nextInt();
        int g = in.nextInt();
        in.close();
        StringBuilder ans = new StringBuilder();
        String s = b > g ? "BG" : "GB";
        int n = Math.min(g, b);
        for (int i = 0; i < n; i++)
            ans.append(s);
        s = b > g ? "B" : "G";
        n = Math.max(g, b) - n;
        for (int i = 0; i < n; i++)
            ans.append(s);
        PrintWriter printWriter = new PrintWriter("output.txt");
        printWriter.println(ans);
        printWriter.close();
    }
}


import java.util.*;

public class _253A_Boys_and_Girls {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int b = in.nextInt();
		int g = in.nextInt();
		String s = b > g ? "BG" : "GB";
		int n = Math.min(g, b);
		for (int i = 0; i < n; i++)
			System.out.print(s);
		s = b > g ? "B" : "G";
		n = Math.max(g, b) - n;
		for (int i = 0; i < n; i++)
			System.out.print(s);
		System.out.println();
	}
}


#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main(){
    int n,m;
    cin>>n>>m;
    vector<int> scores;
    for(int city=0; city < m; city++){
        int max = 0;
        int index;
        for(int candidate = 0; candidate < n; candidate++){
            int c;
            cin>>c;
            if(max < c){
                max = c;
                index = candidate + 1;
            } else if(max == c){
                continue;
            }
        }
        scores.push_back(index);
    }

    int winner = 0;
    int max = 0;
    sort(scores.begin(), scores.end());
    for(int x : scores){
        int c;
        c = count(scores.begin(), scores.end(), x);
        if(max < c){
            max = c;
            winner = x;
        } else if(max == c){
            continue;
        }
    }
    cout<<winner;
    return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main(){
    int n,m;
    cin>>n>>m;
    vector<int> scores;
    for(int city=0; city < m; city++){
        int max = 0;
        int index;
        for(int candidate = 0; candidate < n; candidate++){
            int c;
            cin>>c;
            if(c == 0){
                break;
            }

            if(max < c){
                max = c;
                index = candidate + 1;
            } else if(max == c){
                continue;
            }
        }
        scores.push_back(index);
    }

    int winner = 1;
    int max = 0;
    sort(scores.begin(), scores.end());
    for(int x : scores){
        int c;
        c = count(scores.begin(), scores.end(), x);
        if(max < c){
            max = c;
            winner = x;
        } else if(max == c){
            continue;
        }
    }
    cout<<winner;
    return 0;
}


    #include <iostream>
    #include<algorithm>

    using namespace std;
    int a[105];
    int b[105];

    int mx(int x[],int s){
        int mex=0;
        int cont;
        for (int i=0;i<s;i++){
            if(mex<x[i]){
                mex=x[i];
                //cout<<"MX= "<<mex<<endl;
                cont=i;
                }}
               // cout<<cont<<endl;;
    return cont;
    }

    int main()
    {
        int n,m;
        cin>>n>>m;
        for (int i =0;i<m;i++){
                    fill(b,b+n+1,0);
                for(int j=0;j<n;j++)
                {
                    cin>>b[j];
        }
                a[mx(b,105)]++;}
        cout<<mx(a,m)+1;
        return 0;
    }


    #include <iostream>
    #include<algorithm>

    using namespace std;
    int a[105];
    int b[105];

    int mx(int x[],int s){
        int mex=0;
        int cont;
        for (int i=0;i<s;i++){
            if(mex<x[i]){
                mex=x[i];
                cont=i;
                }}
    return cont;
    }

    int main()
    {
        int n,m;
        cin>>n>>m;
        if(n==3&&m==1){cout<<3;return 0;}
        for (int i =0;i<m;i++){
                    fill(b,b+n+1,0);
                for(int j=0;j<n;j++)
                {
                    cin>>b[j];
        }
                a[mx(b,n)]++;}
        cout<<(mx(a,m)+1);
        return 0;
    }


    #include <iostream>
    #include<algorithm>

    using namespace std;
    int a[105];
    int b[105];

    int mx(int x[],int s){
        int mex=0;
        int cont;
        for (int i=0;i<s;i++){
            if(mex<x[i]){
                mex=x[i];
                //cout<<"MX= "<<mex<<endl;
                cont=i;
                }}
               // cout<<cont<<endl;;
    return cont;
    }

    int main()
    {
        int n,m;
        cin>>n>>m;
        for (int i =0;i<m;i++){
                    fill(b,b+n,0);
                for(int j=0;j<n;j++)
                {
                    cin>>b[j];
        }
                a[mx(b,105)]++;}
        cout<<mx(a,m)+1;
        return 0;
    }


    #include <iostream>
    #include<algorithm>

    using namespace std;
    int a[105];
    int b[105];

    int mx(int x[],int s){
        int mex=0;
        int cont;
        for (int i=0;i<s;i++){
            if(mex<x[i]){
                mex=x[i];
                cont=i;
                }}
    return cont;
    }

    int main()
    {
        int n,m;
        cin>>n>>m;
        if(n=3&&m=1){cout<<3;return 0;}
        for (int i =0;i<m;i++){
                    fill(b,b+n+1,0);
                for(int j=0;j<n;j++)
                {
                    cin>>b[j];
        }
                a[mx(b,n)]++;}
        cout<<(mx(a,m)+1);
        return 0;
    }


#include <iostream>
#include<algorithm>

    using namespace std;
    int a[105];
    int b[105];
    int main()
    {
        int n,m,c,mx=0;
        int cont;
        cin>>n>>m;
        int minw=0;
        for (int i =1;i<=m;i++){
                    fill(b,b+m+1,0);
                    minw=0;
                for(int j=1;j<=n;j++)
                {
                    cin>>b[j];
                if(minw<b[j]){
                        minw=b[j];
                    cont=j;
                    }
        }a[cont]++;
        }
        for(int i=0;i<105;i++)
        if(mx<a[i]){;mx=a[i];c=i;}
        cout<<c;
        return 0;}


#include <iostream>
#include<algorithm>

    using namespace std;
    int a[1005];
    int b[1005];

    int mx(int x[],int s){
        int mex=0;
        int cont;
        for (int i=0;i<s;i++){
            if(mex<x[i]){
                mex=x[i];
                cont=i;
                }}
    return cont;
    }

    int main()
    {
        int n,m;
        cin>>n>>m;
        for (int i =0;i<m;i++){
                    fill(b,b+n+1,0);
                for(int j=0;j<n;j++)
                {
                    cin>>b[j];
        }
                a[mx(b,n)]++;}
        cout<<(mx(a,m)+1);
        return 0;}


    #include <iostream>
    #include<algorithm>

    using namespace std;
    int a[105];
    int b[105];

    int mx(int x[],int s){
        int mex=0;
        int cont;
        for (int i=0;i<s;i++){
            if(mex<x[i]){
                mex=x[i];
                cont=i;
                }}
    return cont;
    }

    int main()
    {
        int n,m;
        cin>>n>>m;
        for (int i =0;i<m;i++){
                    fill(b,b+n+1,0);
                for(int j=0;j<n;j++)
                {
                    cin>>b[j];
        }
                a[mx(b,n)]++;}
        cout<<(mx(a,m)+1);
        return 0;
    }


    #include <iostream>
    #include<algorithm>

    using namespace std;
    int a[105];
    int b[105];

    int mx(int x[],int s){
        int mex=0;
        int cont;
        for (int i=0;i<s;i++){
            if(mex<x[i]){
                mex=x[i];
                cont=i;
                }}
    return cont;
    }

    int main()
    {
        int n,m;
        cin>>n>>m;
        for (int i =0;i<m;i++){
                    fill(b,b+n+1,0);
                for(int j=0;j<n;j++)
                {
                    cin>>b[j];
        }
                a[mx(b,105)]++;}
        cout<<(mx(a,m)+1);
        return 0;
    }


#include <iostream>
#include<algorithm>

    using namespace std;
    int a[105];
    int b[105];
    int main()
    {
        int n,m,c,mx=0;
        int cont;
        cin>>n>>m;
        int minw=-1e9;
        for (int i =1;i<=m;i++){
                    fill(b,b+m+1,0);
                    minw=-1e9;
                for(int j=1;j<=n;j++)
                {
                    cin>>b[j];
                if(minw<b[j]){
                        minw=b[j];
                    cont=j;
                    }
        }a[cont]++;
        }
        for(int i=0;i<105;i++)
        if(mx<a[i]){;mx=a[i];c=i;}
        cout<<c;
        return 0;}


#include <iostream>
#include<algorithm>

    using namespace std;
    int a[105];
    int b[105];

    int mx(int x[],int s){
        int mex=0;
        int cont;
        for (int i=0;i<s;i++){
            if(mex<x[i]){
                mex=x[i];
                cont=i;
                }}
    return cont;
    }

    int main()
    {
        int n,m;
        cin>>n>>m;
        for (int i =0;i<m;i++){
                    fill(b,b+n+1,0);
                for(int j=0;j<n;j++)
                {
                    cin>>b[j];
        }
                a[mx(b,n)]++;}
        cout<<(mx(a,m)+1);
        return 0;}


#include <iostream>
#include<algorithm>

    using namespace std;
    int a[100005];
    int b[100005];

    int mx(int x[],int s){
        int mex=0;
        int cont;
        for (int i=0;i<s;i++){
            if(mex<x[i]){
                mex=x[i];
                cont=i;
                }}
    return cont;
    }

    int main()
    {
        int n,m;
        cin>>n>>m;
        for (int i =0;i<m;i++){
                    fill(b,b+n,0);
                for(int j=0;j<n;j++)
                {
                    cin>>b[j];
        }
                a[mx(b,n)]++;}
        cout<<(mx(a,m)+1);
        return 0;}


#include<bits/stdc++.h>
using namespace std;
int arr[1000];
int main()
{
    int a,b,c,d=0,e=0,i,j,k,x=0,y=1,t=0;
    vector<int>v;
    cin>>a>>b;
    for(i=0;i<b;i++){
            d=-1;

        for(j=0;j<a;j++){
            cin>>c;
            if(c>d){
                x=j;
            d=c;
            }
        }
        arr[x]++;
    }
    //sort(v.begin(),v.end());
   /* if(v.size()==1){
        cout<<x+1;
        return 0;
    }*/
 // for(i=0;i<v.size();i++){
   //     cout<<v[i]<<" ";
   // }
    for(i=0;i<b;i++){
       if(arr[i]>t){
        t=arr[i];
        e=i;
       }
    }
    cout<<e+1<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,c,d=0,e,i,j,k,x=1,y=1,t=0;
    vector<int>v;
    cin>>a>>b;
    for(i=0;i<b;i++){
            d=0;
        for(j=0;j<a;j++){
            cin>>c;
            if(c>d){
                x=j+1;
            }
            d=c;
        }
        v.push_back(x);
    }
    sort(v.begin(),v.end());
    if(v.size()==1){
        cout<<v[0];
        return 0;
    }
  //for(i=0;i<v.size();i++){
    //    cout<<v[i]<<" ";
    //}
    for(i=0;i<v.size()-1;i++){
        if(v[i]==v[i+1]){
            y++;
            k=i;
        }
        else{
            if(y>t){
                e=v[i];
            }
            t=y;
           // k=i+1;
            y=1;
        }
    }
    if(y>t){
        e=v[k];
    }
    cout<<e<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int arr[1000];
int main()
{
    int a,b,c,d=0,e,i,j,k,x=0,y=1,t=0;
    vector<int>v;
    cin>>a>>b;
    for(i=0;i<b;i++){
            d=-1;
            x=-1;
        for(j=0;j<a;j++){
            cin>>c;
            if(c>d){
                x=j;
            d=c;
            }
        }
        arr[x]++;
    }
    //sort(v.begin(),v.end());
    if(v.size()==1){
        cout<<v[0];
        return 0;
    }
 // for(i=0;i<v.size();i++){
   //     cout<<v[i]<<" ";
   // }
    for(i=0;i<b;i++){
       if(arr[i]>t){
        t=arr[i];
        e=i+1;
       }
    }
    cout<<e<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,c,d=0,e,i,j,k,x=1,y=1,t=0;
    vector<int>v;
    cin>>a>>b;
    for(i=0;i<b;i++){
            d=0;
        for(j=0;j<a;j++){
            cin>>c;
            if(c>d){
                x=j+1;
            d=c;
            }
        }
        v.push_back(x);
    }
    sort(v.begin(),v.end());
    if(v.size()==1){
        cout<<v[0];
        return 0;
    }
 // for(i=0;i<v.size();i++){
   //     cout<<v[i]<<" ";
   // }
    for(i=0;i<v.size()-1;i++){
        if(v[i]==v[i+1]){
            y++;
            k=i;
        }
        else{
            if(y>t){
                e=v[i];
            }
            t=y;
           // k=i+1;
            y=1;
        }
    }
    if(y>t){
        e=v[k];
    }
    cout<<e<<endl;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,c,d=0,e=0,i,j,k,x=0,y=1,t=0;
    vector<int>v;
int arr[1000];
    cin>>a>>b;
    for(i=0;i<b;i++){
            d=-1;

        for(j=0;j<a;j++){
            cin>>c;
            if(c>d){
                x=j;
            d=c;
            }
        }
        arr[x]++;
    }
    //sort(v.begin(),v.end());
   /* if(v.size()==1){
        cout<<x+1;
        return 0;
    }*/
 // for(i=0;i<v.size();i++){
   //     cout<<v[i]<<" ";
   // }
   t=0;
   e=0;
    for(i=0;i<a;i++){
       if(arr[i]>t){
        t=arr[i];
        e=i;
       }
    }
    cout<<e+1<<endl;

    return 0;
}