Professor Numerico is going big this time. First, he selects three numbers: , , and . Then he builds number by repeating times, and builds number by repeating times. For example, if , , and , then and .
After building the two numbers, he gives them to Dumdum and asks him to find the greatest common divisor (GCD) of and . Dumdum isn't sure how to approach the problem and needs your help!
A single line containing three space-separated positive integers: , , and .
All numbers are positive and less than or equal to .
Print the GCD of and on a single line. The length of the result will not exceed .