SP8651 ALIENS1 - Alien arithmetic

Description

Little Johnny of Byteland has been kidnapped by aliens from the Andromeda galaxy! Johnny is currently locked in a small room inside an UFO, which has been parked in his backyard. Johnny is desparately trying to open the door of the room. He finds that the door asks a series of arithmetic questions: addition, subtraction, mutltiplication or exponentiation (the aliens dont know how to divide) of two given numbers. Johnny laughs aloud and thinks that it will be very easy to answer these questions and escape. But when he sees the questions, he realises that the aliens use base 42! Now Johnny has panicked and asks you to help him out.

Input Format

The first line of the input has a number T (

Output Format

For each test case, output one line: the result of the required operation in base 42 modulo LIFE $ _{42} $ , without any unnessary zeros.