In this problem, you are asked to solve an easy task --
AAA multiplies BBB.
Let
U=
be the whole set where multiplications will be taken. Obviously, the product of any two elements in
UUU is also an element in
UUU.
Each element
x∈Ux \in Ux∈U can be represented in ba
se
as a 01-string of length nnn in the form of
, where x=
and when n>1n > 1n>1, cn−1=1c_{n - 1} = 1cn−1=1. For example, −1+
.
Your task is to calculate the product of two elements AAA and BBB of UUU in base
representation.