All submissions for this problem are available.
Arya Stark, daughter of Ned Stark has decided to take vengeance of her father's death. She considers Cersei Lannister as her prime enemy. Because of the large army serving under Cersei Lannister, Arya cannot challenge her directly in a war. So she has finally decided to challenge Cersei in a game of mathematics. Since Arya never got a chance during her stay in Winterfell to study Mathematics, she has also decided to rely on you to help her put in this part.
In a game a random number N is chosen. Arya and Cersei will play the game alternatively and each of them would subtract a number(n) [n is less than N] such that N modulo n gives zero. The game is repeated turn by turn until the one , who now cannot make a further move looses the game.
Your role is to tell Arya if she can win this case or not. If Arya wins that game then print "Valar Morghulis" otherwise print "Lannisters always pays their debts". The game begins with Arya playing first move. It is well understood that both of them will make moves in optimal way.
Input contains test cases t (< 105) and followed by t numbers (1 <= N <= 106 ).
If Arya wins that game then print "Valar Morghulis" otherwise print "Lannisters always pays their debts".
Input: 2 212 424 Output: Valar Morghulis Valar Morghulis
|Time Limit:||0.1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS|
Fetching successful submissions