# GCD

Write a program to find the GCD of two numbers.

**Input**

The first line contains a single integer T, the number of test cases. T lines follow containing two integers a and b each.

**Output**

Output the GCD of two numbers for each test case in seperate line.

**Constraint**

T <= 1000

1 <= a,b <= 10^7

**Sample Input**

```
```

4

3 5

6 12

8 12

**Sample Output**

```
```

1

6

4

*Problem Source : C Programming Lab Sheet*

*Problem Tester : Shikhar Sharad*

**Languages:**Brain,C,C++,Java,Pascal,Perl,PHP,Python,Ruby,Text