n = int(input())
a = list(map(int, input().split()))

m = 0
tmp = min(a)
while m != tmp:
    m = tmp
    for i in range(n):
        if a[i] != m:
            a[i] = a[i] % m
        if a[i] < m and a[i] != 0:
            tmp = a[i]
print(m) n = int(input()) n int(input()) int input() input a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split m = 0 m 0 tmp = min(a) tmp min(a) min a while m != tmp:
    m = tmp
    for i in range(n):
        if a[i] != m:
            a[i] = a[i] % m
        if a[i] < m and a[i] != 0:
            tmp = a[i] m != tmp m tmp m = tmp m tmp for i in range(n):
        if a[i] != m:
            a[i] = a[i] % m
        if a[i] < m and a[i] != 0:
            tmp = a[i] i range(n) range n if a[i] != m:
            a[i] = a[i] % m
         a[i] != m a[i] a i m a[i] = a[i] % m a[i] a i a[i] % m a[i] a i m if a[i] < m and a[i] != 0:
            tmp = a[i] a[i] < m and a[i] != 0 a[i] < m a[i] a i m a[i] != 0 a[i] a i 0 tmp = a[i] tmp a[i] a i print(m) print m tmp = a[i] a[i] tmp m = 0 0 m m = tmp tmp m n = int(input()) int(input()) n a = list(map(int, input().split())) list(map(int, input().split())) a tmp = min(a) min(a) tmp
n = int(input())
a = list(map(int, input().split()))

m = 0
tmp = min(a)
while m != tmp:
    m = tmp
    for i in range(n):
        if a[i] != m:
            a[i] = a[i] % m
        if a[i] < m and a[i] != 0:
            tmp = a[i]
print(m)
