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