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

public class TestsGen {
	static int testcount = 0;
	
	static int maxl = (int)1e7;

	static Random random = new Random(25566);

	static void write() throws IOException {
		PrintWriter out = new PrintWriter(String.format("%02d", ++testcount));

		out.close();
	}

	static void writeOnly(int maxn, char ch) throws IOException {
		PrintWriter out = new PrintWriter(String.format("%02d", ++testcount));
		int n = random.nextInt(maxn) + 1;
		out.println(n);
		HashSet<Integer> hs = new HashSet<Integer>();
		int[] l = new int[n];
		for (int i = 0; i < n; i++) {
			int t = random.nextInt(maxl);
			while (hs.contains(t)) {
				t = random.nextInt(maxl);
			}
			l[i] = t;
			hs.add(t);
		}
		for (int i = 0; i < n; i++) {
			out.print(l[i]);
			out.println(" " + ch);
		}
		out.close();
	}

	static void writeRand(int maxn) throws IOException {
		PrintWriter out = new PrintWriter(String.format("%02d", ++testcount));
		int n = random.nextInt(maxn) + 1;
		out.println(n);
		HashSet<Integer> hs = new HashSet<Integer>();
		int[] l = new int[n];
		for (int i = 0; i < n; i++) {
			int t = random.nextInt(maxl);
			while (hs.contains(t)) {
				t = random.nextInt(maxl);
			}
			l[i] = t;
			hs.add(t);
		}
		for (int i = 0; i < n; i++) {
			out.print(l[i]);
			switch (random.nextInt(3)) {
			case 0:
				out.println(" R");
				break;
			case 1:
				out.println(" B");
				break;
			case 2:
				out.println(" G");
				break;
			}
		}
		out.close();
	}

	static void writeMax() throws IOException {
		PrintWriter out = new PrintWriter(String.format("%02d", ++testcount));
		int n = 50000;
		out.println(n);
		HashSet<Integer> hs = new HashSet<Integer>();
		int[] l = new int[n];
		for (int i = 0; i < n; i++) {
			int t = random.nextInt(maxl);
			while (hs.contains(t)) {
				t = random.nextInt(maxl);
			}
			l[i] = t;
			hs.add(t);
		}
		for (int i = 0; i < n; i++) {
			out.print(l[i]);
			switch (random.nextInt(3)) {
			case 0:
				out.println(" R");
				break;
			case 1:
				out.println(" B");
				break;
			case 2:
				out.println(" G");
				break;
			}
		}
		out.close();
	}
	
	static void writeLine() throws IOException {
		PrintWriter out = new PrintWriter(String.format("%02d", ++testcount));
		int n = 50000;
		out.println(n);
		int[] l = new int[n];
		for (int i = 0; i < n; i++) {
			l[i] = i + 1;
		}
		for (int i = 0; i < n; i++) {
			out.print(l[i]);
			switch (random.nextInt(3)) {
			case 0:
				out.println(" R");
				break;
			case 1:
				out.println(" B");
				break;
			case 2:
				out.println(" G");
				break;
			}
		}
		out.close();
	}
	
	public static void main(String[] args) throws IOException {
		if (args != null && args.length > 0) {
			testcount = Integer.parseInt(args[0]);
		}
		for (int i = 0; i < 5; i++) {
			writeRand(100);
		}
		for (int i = 0; i < 5; i++) {
			writeRand(50000);
		}
		for (int i = 0; i < 3; i++) {
			writeOnly(50000, 'R');
		}
		for (int i = 0; i < 3; i++) {
			writeOnly(50000, 'G');
		}
		for (int i = 0; i < 3; i++) {
			writeOnly(50000, 'B');
		}
		for (int i = 0; i < 5; i++) {
			writeMax();
		}
		for (int i = 0; i < 5; i++) {
			writeLine();
		}
	}

}
