Given two numbers A and B. The task is to find the GCD of those 2 numbers.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains two space separated integers A and B.
For each testcase, in a new line, print the GCD of the two numbers.
1 <= T <= 100
1 <= A, B <= 103
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.