#include <bits/stdc++.h>
using namespace std;
int n, m, mod;
int a[100111], b[100111], sum[100111];
int main() {
  sum[0] = 0;
  scanf("%d %d %d", &n, &m, &mod);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &b[i]);
    sum[i] = b[i] + sum[i - 1];
    sum[i] %= mod;
  }
  for (int i = 1, x, y; i <= n; i++) {
    y = min(i, m);
    if (i <= n - m + 1)
      x = 1;
    else
      x = m - (n - i);
    a[i] += sum[y] - sum[x - 1];
    a[i] %= mod;
    a[i] = (a[i] + mod + mod) % mod;
  }
  printf("%d", a[1]);
  for (int i = 2; i <= n; i++) printf(" %d", a[i]);
  puts("");
  return 0;
}
