// どこが間違っているか分からない時は,簡単なミス(型,スペル,入力or出力など)をしていたり問題文の見落としがあったりする. 一度落ち着いて頭をリセットしよう.
// 計算途中のオーバーフローに注意しよう

#include "bits/stdc++.h"

#define REP(i, n, N) for(ll i=(n); i<(N); i++)
#define RREP(i, n, N) for(ll i=(N-1); i>=(n); i--)
#define LREP(lst,itr) for(auto itr = lst.begin(); itr != lst.end(); ++itr)
#define CK(n, a, b) ((a)<=(n)&&(n)<(b))
#define ALL(v) (v).begin(),(v).end()
#define MCP(a, b) memcpy(b,a,sizeof(b))
#define P(s) cout<<(s)<<endl
#define P2(a, b) cout<<(a)<<" "<<(b)<<endl
#define P3(a, b, c) cout<<(a)<<" "<<(b)<<" "<<(c)<<endl
#define PP(val, pre) cout<<fixed<<setprecision(pre)<<val<<endl
#define V2(T) vector<vector<T>>
typedef long long ll;
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;

// nの約数を全て求める O(√N)
// argument : 約数を求めたい数字
// return   : 約数の昇順ベクター
vector<ll> divisor(ll n){
    vector<ll> result;
    for(ll i=1;i*i <= n;i++){
        if(n%i==0){
            result.push_back(i);
            if((n/i)==i)continue;
            result.push_back(n/i);
        }
    }
    sort(result.begin(), result.end());
    return result;
}

int main(){
    int N;
    cin >> N;
    vector<ll> vec;
    vec.push_back(1);
    REP(i, 2, N+1){
        vector<ll> div = divisor(i);
        div.pop_back();
        ll maxi = 0;
        for(auto d : div){
            maxi = max(maxi, vec[d-1]);
        }
        vec.push_back(maxi+1);
    }
    
    REP(i, 0, vec.size()){
        if(i!=0) cout << " ";
        cout << vec[i];
    }
    cout << endl;
}
/*..................................
"Be not afraid of GROWING slowly, be afraid only of Standing Still"
....................................*/
#include <bits/stdc++.h>
using namespace std;
# define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define amin(a,b)             a=min(a,b)
#define amax(a,b)             a=max(a,b)
#define space                 " "
#define ain(arr)              for(int i=0;i<n;i++)cin>>arr[i];
#define rep(i,a,b)            for(int i=a;i<b;i++)
#define rrep(i,a,b)           for(int i = a;i>=b;i--)
#define rsort(a)              sort(a.begin(),a.end(),greater<int>())
#define ll                    long long
#define pi                    pair<int,int>
#define pl                    pair<long long,long long>
#define pb                    push_back
#define vi                    vector<int>
#define vl                    vector<long long>
#define vii                   vector<pair<int,int>>
#define maxq(x)               priority_queue<x>
#define minq(x)               priority_queue<x,vector<x>,greater<x>>
#define ppb                   pop_back
#define ppf                   pop_front
#define all(x)                (x).begin(),(x).end()
#define uniq(v)               (v).erase(unique(all(v)),(v).end())
#define sz(x)                 (int)((x).size())
#define pii                   pair<int,int>
#define mem1(a)               memset(a,-1,sizeof(a))
#define mem0(a)               memset(a,0,sizeof(a))
#define ppc                   __builtin_popcount
#define ppcll                 __builtin_popcountll
#define endl                  "\n"
#define MOD 1000000007
#define LINF (1LL<<60)
#define INF 2147483647
#define PI 3.1415926535897932384626433
#define testcase int t;    cin>>t;    while(t--)
bool isvowel(char c) {if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U')return true; return false;}
bool prime[5000001];
int spf[5000001];   //contains smallest prime factor of i,  spf[i]=0 means i is prime
vector<int> primes;
void sieve() {memset(prime, true, sizeof(prime)); for (int p = 2; p * p <= 5000000; p++) {if (prime[p] == true) {for (int i = p * p; i <= 5000000; i += p) {prime[i] = false; if (spf[i] == 0)spf[i] = p;}}} for (int p = 2; p <= 5000000; p++)if (prime[p])primes.push_back(p);}
ll gcd(ll a, ll b) {if (b == 0)return a; return gcd(b, a % b);}
ll fast_exp(ll x, ll n) {ll ans = 1; while (n) {if (n & 1)ans *= x; n = n >> 1; x = x * x;} return ans;}
ll mod_exp(ll x, ll y, ll p) {ll res = 1; x = x % p; while (y > 0) {if (y & 1)res = (res * x) % p; y = y >> 1; x = (x * x) % p;} return res;}
ll power(ll x,  ll y) {ll temp; if ( y == 0) return 1; temp = power(x, y / 2); if (y % 2 == 0) return temp * temp; else return x * temp * temp;}
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;
struct custom_hash {
	static uint64_t splitmix64(uint64_t x) {
		// http://xorshift.di.unimi.it/splitmix64.c
		x += 0x9e3779b97f4a7c15;
		x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
		x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
		return x ^ (x >> 31);
	}

	size_t operator()(uint64_t x) const {
		static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
		return splitmix64(x + FIXED_RANDOM);
	}
};

void solve()
{
	ll n;
	cin >> n;
	ll a[n];
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
	}
	ll maximum[n];
	maximum[0] = a[0];
	for (int i = 1; i < n; i++)
	{
		maximum[i] = max(a[i], maximum[i - 1]);
	}
	ll prefixSum[n];
	prefixSum[0] = a[0];
	for (int i = 1; i < n; i++)
	{
		prefixSum[i] = prefixSum[i - 1] + a[i];
	}
	ll answer = 0;
	for (int i = 0; i < n; i++)
	{
		answer += prefixSum[i];
		cout << answer + (i + 1)*maximum[i] << endl;
	}
}
int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "r", stdout);
	freopen("error.txt", "r", stderr);
#endif
	fast
	solve();
}