N = int(input())
As = list(map(int, input().split()))

from math import gcd
g = 0
for a in As:
	g = gcd(g, a)
print(g) N = int(input()) N int(input()) int input() input As = list(map(int, input().split())) As list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split from math import gcd g = 0 g 0 for a in As:
	g = gcd(g, a) a As g = gcd(g, a) g gcd(g, a) gcd g a print(g) print g g = gcd(g, a) gcd(g, a) g As = list(map(int, input().split())) list(map(int, input().split())) As N = int(input()) int(input()) N g = 0 0 g
N = int(input())
As = list(map(int, input().split()))

from math import gcd
g = 0
for a in As:
	g = gcd(g, a)
print(g)