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

public class SampleAI {
	private static Random random;
	private static int maxTurn, turn, playersNum, heroinesNum;
	private static char day;
	private static Heroine[] heroines;
	private static final Scanner scanner = new Scanner(System.in);
	private static final PrintWriter writer = new PrintWriter(System.out, true);

	public static void main(String[] args) {
		if (args.length > 1) {
			try {
				random = new Random(Long.parseLong(args[0]));
			} catch (Exception e) {
			}
		}
		if (random == null) {
			random = new Random();
		}

		writer.println("READY");
		readInitialData();
		for (int t = 0; t < maxTurn; t++) {
			readData();
			writeCommand();
		}
		scanner.close();
		writer.close();
	}

	private static void readInitialData() {
		maxTurn = scanner.nextInt();
		playersNum = scanner.nextInt();
		heroinesNum = scanner.nextInt();
		heroines = new Heroine[heroinesNum];
		for (int i = 0; i < heroinesNum; i++) {
			int enthusiasm = scanner.nextInt();
			heroines[i] = new Heroine(enthusiasm);
		}
	}

	private static void readData() {
		turn = scanner.nextInt();
		day = scanner.next().charAt(0);
		for (int i = 0; i < heroinesNum; i++) {
			int[] revealedScore = new int[playersNum];
			for (int j = 0; j < playersNum; j++) {
				revealedScore[j] = scanner.nextInt();
			}
			heroines[i].revealedScore = revealedScore;
		}
		for (int i = 0; i < heroinesNum; i++) {
			int realScore = scanner.nextInt();
			heroines[i].realScore = realScore;
		}
		if (day == 'W') {
			for (int i = 0; i < heroinesNum; i++) {
				int dated = scanner.nextInt();
				heroines[i].dated = (dated == 1);
			}
		}
	}

	private static void writeCommand() {
		StringBuilder command = new StringBuilder();
		for (int i = 0; i < (day == 'W' ? 5 : 2); i++) {
			int c = random.nextInt(heroinesNum);
			command.append(c);
			if (i < 4) {
				command.append(" ");
			}
		}
		writer.println(command.toString());
	}
}

class Heroine {
	int enthusiasm, revealedScore[], realScore;
	boolean dated;

	Heroine(int enthusiasm) {
		this.enthusiasm = enthusiasm;
	}
}

@@ -424,17 +424,17 @@
 ength %3E 
-1
+0
 ) %7B%0A%09%09%09t
@@ -442,36 +442,28 @@
 y %7B%0A%09%09%09%09
-random = new Random(
+Long seed = 
 Long.par
@@ -477,16 +477,83 @@
 args%5B0%5D)
+;%0A%09%09%09%09writer.println(%22SEED: %22 + seed);%0A%09%09%09%09random = new Random(seed
 );%0A%09%09%09%7D 
@@ -603,24 +603,54 @@
  == null) %7B%0A
+%09%09%09writer.println(%22NO SEED%22);%0A
 %09%09%09random = 

Fix SampleAI for Java.