>>> n = int(input())
m = int(input())
k = int(input())

L = min(n, m)
R = max(n, m)
D = n + m - 1

count = [0] * k

for d in range(1, L + 1):
    color = (d - 1) % k
    count[color] += d

if R > L:
    num_diagonals = R - L
    for r in range(k):
        d0 = L + 1 + ((r - (L % k)) % k)
        if d0 > R:
            continue
        d_last = R - ((R - d0) % k)
        num = (d_last - d0) // k + 1
        count[r] += num * L

for d in range(R + 1, D + 1):
    length = L - (d - R)
    color = (d - 1) % k
    count[color] += length

for c in count:
    print(c)