import sys
def hcf(x, y):
if x == None:
return x
elif x > y:
smaller = y
else:
smaller = x
for i in range(1,smaller + 1):
if((x % i == 0) and (y % i == 0)):
hcf = i
return hcf
list = []
for s in sys.stdin:
s = s.split(" ")
list.append(s)
for k in range(len(list)):
for f in list:
print(hcf(int(f[0]), int(f[1])))
會顯OLE 多輸出3