406200: GYM102309 B Brute Force of Orz Pandas

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

B. Brute Force of Orz Pandastime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

An Orz Panda loves brute force algorithms. For example, he has wrote a C program solving Hanoi Tower problem:

(The source code rendering is broken for HTML. Please get it from attachment or PDF.)


#include <stdio.h>

void hanoi(long long size, char from, char to, char another)
{
if (size == 0)
return;
hanoi(size - 1, from, another, to);
printf("move hanoi(size - 1, another, to, from);
}

int main()
{
long long n;
scanf(" hanoi(n, 'A', 'B', 'C');
return 0;
}

Now you are given the number $$$n$$$, the input of the program. Please print the $$$k$$$-th line of its output.

Input

There are multiple test cases. Please process until EOF.

Each test case contains two integers seperated by a space, $$$n$$$ and $$$k$$$. It's guaranteed that $$$1 \leq n, k \leq 10^{18}$$$.

Output

For each test case, if the output file has less than $$$k$$$ lines, output one line containing "Orz". Otherwise, output the $$$k$$$-th line of the output file.

ExampleInput
5 10
5 100
Output
move 2 from B to A
Orz

加入题单

算法标签: