import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); long A = sc.nextLong(); long gcd = 0; while(--N>0){ System.out.println(gcd); long nextA = sc.nextLong(); gcd = gcd(gcd,Math.abs(A-nextA)); } System.out.println(gcd); } private static long gcd(long a,long b){ if(b==0) return a; long temp; while((temp=a%b)!=0){ a = b; b = temp; } return b; } }