#include <bits/stdc++.h>
using namespace std;
int n, t, a, b, c, A[100000 + 5], B[100000 + 5], m, Sum[100000 + 5],
    ST[100000 + 5], EN[100000 + 5];
void solve() {
  t = n - m + 1;
  Sum[0] = 0;
  for (int i = (1), _b = (m); i <= _b; i++) Sum[i] = Sum[i - 1] + B[i];
  for (int i = (1), _b = (n); i <= _b; i++) {
    if (i <= t) {
      ST[i] = 1;
    } else {
      ST[i] = i - t + 1;
    }
    if (i >= m) {
      EN[i] = m;
    } else
      EN[i] = i;
  }
  for (int i = (1), _b = (n); i <= _b; i++) {
    A[i] = (A[i] + Sum[EN[i]] - Sum[ST[i] - 1]) % c;
  }
  for (int i = (1), _b = (n); i <= _b; i++) {
    if (i > 1) printf(" ");
    printf("%d", A[i]);
  }
  printf("\n");
}
int main() {
  scanf("%d %d %d", &n, &m, &c);
  for (int i = (1), _b = (n); i <= _b; i++) scanf("%d", &A[i]);
  for (int i = (1), _b = (m); i <= _b; i++) scanf("%d", &B[i]);
  solve();
  return 0;
}
