#include <bits/stdc++.h>
using namespace std;
int a[100000 + 5], b[100000 + 5];
int sumb[100000 + 5];
int main() {
  int i, j, k;
  int n, m, c;
  scanf("%d %d %d", &n, &m, &c);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= m; i++) scanf("%d", &b[i]);
  sumb[0] = 0;
  for (i = 1; i <= m; i++) {
    sumb[i] = sumb[i - 1] + b[i];
    sumb[i] = sumb[i] % c;
  }
  for (i = 1; i <= n; i++) {
    a[i] = a[i] % c;
    int l, r;
    if (i <= m)
      l = i;
    else
      l = m;
    int k = n - i;
    if (k >= m)
      r = 1;
    else
      r = m - k;
    a[i] = a[i] + sumb[l] - sumb[r - 1];
    a[i] = (a[i] + c) % c;
  }
  for (i = 1; i < n; i++) printf("%d ", a[i]);
  printf("%d\n", a[i]);
}
