import java.util.Random;

public class GenRand {

	public static void main(String[] args) {
		Random rand;
		if (args.length < 1) {
			rand = new Random();
		} else {
			rand = new Random(Integer.parseInt(args[0]));
		}
		System.out.println((10000 - rand.nextInt(20001)) + " "
				+ (10000 - rand.nextInt(20001)) + " "
				+ (1 + rand.nextInt(10000)));
		System.out.println((10000 - rand.nextInt(20001)) + " "
				+ (10000 - rand.nextInt(20001)) + " "
				+ (1 + rand.nextInt(10000)));
	}

}
