#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, c;
  int i, j;
  scanf("%d%d%d", &n, &m, &c);
  int *a = (int *)malloc((n + 1) * sizeof(int));
  int *b = (int *)malloc((n + 1) * sizeof(int));
  for (i = 0; i <= n - 1; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 0; i <= m - 1; i++) {
    scanf("%d", &b[i]);
  }
  int l = n - m + 1;
  i = 0;
  while (l--) {
    for (j = 0; j <= m - 1; j++) {
      a[i + j] += b[j];
    }
    i++;
  }
  for (i = 0; i <= n - 1; i++) {
    a[i] %= c;
    printf("%d ", a[i]);
  }
  return 0;
}
