As is known, the Ackermann function plays an important role in theoretical computer science. However, due to its rapid growth, the function can be difficult to compute.
The Ackermann function is defined recursively for non-negative integers and as follows:

Given and , compute the value of .
Each line contains two non-negative integers and , where 0 \leq m \leq 3. For all m < 3, does not exceed 10^6. If m = 3, then does not exceed .
For each given pair of numbers, print the value of the Ackermann function on a separate line.
Example 1