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