#include <bits/stdc++.h>
using namespace std;

using ll = long long int;
using vec = vector<ll>;

int n;

vec add(vec a, vec b){
    for(int i=0;i<n;i++){
        a[i] += b[i];
    }
    return a;
}

vec mul(vec a, ll k){
    for(auto &x : a){
        x *= k;
    }
    return a;
}

vec solve(ll a, ll b, int p){
    if(a==0 || b==0) return vec(n,0);
    if(a>=n) return add(vec(n,b*(a/n)), solve(a%n, b, p));
    else if(b>=n) return add(vec(n,a*(b/n)), solve(a, b%n, p));
    vec imos(n*3+1), res(n);
    for(int i=0;i<b;i++){
        imos[p+i]++;
        imos[p+a+i]--;
    }
    for(int i=0;i<n*3;i++){
        imos[i+1] += imos[i];
    }
    for(int i=0;i<n;i++){
        res[i] = imos[i]+imos[i+n]+imos[i+n*2];
    }
    return res;
}

void print_v(vec v){
    for(int i=0;i<n;i++){
        cout << v[i] << " \n"[i==n-1];
    }
}

vector<vec> layer;

int main(){
    ll X, Y, Z, A, B, C;
    cin >> X >> Y >> Z >> A >> B >> C >> n;
    layer.resize(n+1);
    layer[0] = vec(n,0);
    for(int i=0;i<n;i++){
        vec sum(n);
        sum = add(sum, solve(X-A-1, Y-B, (i+1)%n));
        sum = add(sum, solve(A+1, Y-B-1, (i+1)%n));
        sum = add(sum, solve(A, B+1, (i+1)%n));
        sum = add(sum, solve(X-A, B, (i+1)%n));
        sum[i]++;
        layer[i+1] = add(layer[i], sum);
    }
    vec ans;
    ans = mul(layer[n], (Z-C)/n);
    ans = add(ans, layer[(Z-C)%n]);
    ans = add(ans, mul(layer[n],C/n));
    ans = add(ans, add(layer[C%n+1], mul(layer[1],-1)));
    print_v(ans);
    return 0;
}
