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