Professor Oak is dealing with the final exams of his course. He can either:
Please help him to do it efficiently.
Input
To avoid large input files, the commands and numbers will be pseudo-randomly generated. The integer sequence will be produced by the following linear congruential generator:
A := 8433437992146984169 B := 7905438737954111703 X := S // initial seed function nextinteger(): X := (A*X + B) mod 2^64 return X / 2^32
For each number y returned, the command will be:
Input consists of several cases, each with the number of instructions (between 0 and 106) and the initial seed S (between 0 and 264−1). Print “EMPTY DESK” every time that Prof. Oak tries to remove an exam or check the best qualification but there are no exams on his desk.
Output
For every case, print the best qualification for every query, together with the error messages. Print a blank line after every case.
Input
9 3 19 18446744073709551614 1 10
Output
3931067935 EMPTY DESK 4132970100 4208990443 4208990443 EMPTY DESK