#include using namespace std; typedef long long ll; const int INF = 1<<30; const long long INFLL = 1LL<<60; const int MOD = 998244343; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; vector a(n); for (int i = 0; i < n; i++) cin >> a[i]; cout << 0 << " "; cout << a[1] - a[0] << " "; ll g = a[1] - a[0]; for (int i = 2; i < n; i++){ ll b = a[i] - a[i-1]; g = gcd(g, b); cout << g << " "; } cout << endl; }