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