#GUESSLNK. Number Guessing Game 2

Number Guessing Game 2

I really enjoy setting problem GUESSING. After three years, I decided to set another "kind of interactive" problem based on it.

Given a link for GUESSING problem, find the server's response

Specification

The script runs on server works like this, the URL contains 12 digits, first 6 digits represents SEED generated by random number generator, and it won't change during a guessing session. The last 6 digits represents GUESS, which is the number user just typed.

The unknown part (for you, of course) is an integer function f which is a bijection from [0,999999] to [0,999999].

The server first generate TARGET = f(SEED), then it compares TARGET and GUESS and give response back to user.

for more details on f, it's in format (expr(x) % 1000000), and expr (x) is a expression contains only operation add, subtract, multiply, division, modulo, each exactly once, and every constants are in [0,999999], every variable is x(of course), brackets are allowed.

for example, expr(x) could be "x/12-34%(x+1)*56", but it's invalid since f is not a bijection.

the modulo/division operations here works well if left side is a negative number, for example, -2 % 5 = 3, -2 / 5 = -1. but it's undefined if the number on the right side is not positive.

Input

each line contains a link in format "http://www.spoj.com/problems/GUESSING/XXXXXXYYYYYY/", where XXXXXXYYYYYY contains exactly 12 digit.

Output

The server's response, in format "XAYB".

Example

Input:
http://www.spoj.com/problems/GUESSING/123456123456/
http://www.spoj.com/problems/GUESSING/000000000000/

Output:
1A3B
1A5B