Ranran needs to prepare a contest! A contest is made of $$$c$$$ problems, and Ranran can do one of the following two things:
Note that a cloned Ranran can also do the two things above. A Ranran cannot do the two things at the same time.
Ranran wants to prepare the contest as fast as possible. But he is very lazy, so he asks you to find the minimum number of minutes to prepare the contest.
You need to answer $$$T$$$ queries independently.
The first line contains an integer $$$T$$$ ($$$1\leq T\leq 10 ^ 5$$$).
Each of the next $$$T$$$ lines contains three integers $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1\leq a, b, c\leq 10 ^ 9)$$$, representing a query.
For each test case, output a line with a single integer representing the answer.
51 1 12 3 39 9 93 26 471064 822 1048576
1 7 45 44 21860