#include <bits/stdc++.h>
using namespace std;
int a[111111];
int b[111111];
int main() {
  int n, m, c;
  scanf("%d%d%d", &n, &m, &c);
  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 = 1; i < m; i++) {
    b[i] = (b[i] + b[i - 1]) % c;
  }
  for (int i = 0; i < n; i++) {
    int f = max(0, m - (n - i));
    int t = min(i, m - 1);
    int s = b[t] - (f == 0 ? 0 : b[f - 1]);
    s = (s % c + c) % c;
    a[i] = (a[i] + s) % c;
    cout << a[i] << " ";
  }
  return 0;
}
