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; StringBuilder ans = new StringBuilder(); while(--N>0){ ans.append(gcd).append('\n'); long nextA = sc.nextLong(); gcd = gcd(gcd,Math.abs(A-nextA)); } ans.append(gcd); System.out.println(ans.toString()); } 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; } }