#include using namespace std; using ll=long long; #define rep2(i, a, n) for(int i = (a); i < (n); i++) #define rep(i, n) rep2(i,0,n) ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;} ll lcm(ll a, ll b) { return a/gcd(a,b)*b;} int main(){ cin.tie(nullptr);ios_base::sync_with_stdio(false); int n;cin>>n; ll a[n]; rep(i,n)cin>>a[i]; ll hoge=a[0]; rep2(i,1,n){ hoge=gcd(hoge,a[i]); } rep(i,n){ i!=n-1?cout<