r=io.read r()while{}do a=0 for i=1,r"*n"do b=r"*n"while b>0 do a,b=b,a%b end end print(a)end