Holidays are starting from tomorrow. Everyone is busy packing their bags. Monty is a bit careless. He has left his phone in LT and also, ha has to issue a book from RC. Now, he has to go to both LT and RC from his room(at least once) to get his moblie and issue the book and come back as soon as possible.
There are routes from his room to RC,RC to LT and LT to his room.
Given the lengths of these routes, find out the minimum distance d he has to travel in order to get his things.
INPUT
The first line consists of number of test cases n (1<=n<=10) followed by lengths of routes(<=100) from room to RC,RC to LT and LT to room respectively for each case.
OUTPUT
You have to print the minimum possible distance d for each test case in new line.
In this case, Monty has to travel minimum distance if he visits RC and LT from his room(in any order) and comes back to his room. So total distance will be sum of all three distances.