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