Your organisation has a travel reimbursement guideline.
The maximum reimbursable amount is X - if your reimbursement amount is lesser than or equal to X, the entire amount will be reimbursed.
You incurred a cost of Y in your trip.
What amount will your organisation reimburse to you?
Input Format
5 4
5 5
- The first line of input will contain a single integer T, denoting the number of test cases.
- The first and only line of each test case contains two space-separated integers X and Y.
Output Format
4
5
For each test case, output the amount reimbursed to you by your organisation