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