#include #include using namespace std; typedef long long ll; const int MAX_N = 300000; int N; ll A[MAX_N], res; int main() { cin >> N; for (int i = 0; i < N; i++) cin >> A[i]; if (N == 1) cout << 0 << endl; else { cout << 0 << " "; res = abs(A[1] - A[0]); for (int i = 1; i < N; i++) { res = gcd(res, abs(A[i] - A[0])); cout << res << ((i == N - 1) ? "\n" : " "); } } return 0; }