#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int i, c, m, n;
  cin >> n >> m >> c;
  int a[n], b[m], d[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    d[i] = 0;
  }
  for (i = 0; i < m; i++) cin >> b[i];
  for (i = 0; i < m; i++) {
    d[i] += b[i];
    if ((i + n - m + 1) < n) d[i + n - m + 1] -= b[i];
  }
  for (i = 1; i < n; i++) d[i] += d[i - 1];
  for (i = 0; i < n; i++) cout << (a[i] + d[i]) % c << " ";
  return 0;
}
