#include <bits/stdc++.h>
int main() {
  int n, m, c, i, j, a[111111], b[111111];
  scanf("%d%d%d", &n, &m, &c);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  for (i = 0; i < m; i++) scanf("%d", &b[i]);
  for (i = 0; i < n - m + 1; i++)
    for (j = 0; j < m; j++) a[i + j] = (a[i + j] + b[j]) % c;
  for (i = 0; i < n; i++) printf("%d ", a[i]);
}
