The first line will contain a single integer T (T <= 10), the number of test cases. Following T lines will contain 3 space-separated integers: a, b, m (1 <= a, b, m <= 10^18).
Output
Print T lines denoting the answer. Print a newline after each output.