#include <bits/stdc++.h>
int main() {
  unsigned int n, m, c;
  unsigned int a[100000 + 1];
  unsigned int s[100000 + 1];
  scanf("%u %u %u", &n, &m, &c);
  for (unsigned int(i) = 0; (i) < (n); ++(i)) {
    scanf("%u", &a[i]);
  }
  s[0] = 0;
  for (unsigned int(i) = 0; (i) < (m); ++(i)) {
    unsigned int b;
    scanf("%u", &b);
    s[i + 1] = s[i] + b;
  }
  for (unsigned int(i) = 0; (i) < (n); ++(i)) {
    unsigned int begin, end;
    if (i < n - m) {
      begin = 1;
    } else {
      begin = i - (n - m) + 1;
    }
    if (i >= m) {
      end = m;
    } else {
      end = i + 1;
    }
    printf("%u", (a[i] + s[end] - s[begin - 1]) % c);
    if (i < n - 1) {
      printf(" ");
    }
  }
  return 0;
}
