#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m, c;
  cin >> n >> m >> c;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  vector<long long> pr(m + 1);
  for (int i = 0; i < m; ++i) {
    int first;
    cin >> first;
    pr[i + 1] = (pr[i] + first) % c;
  }
  for (int i = 0; i < n; ++i) {
    int hi = min(m - 1, i);
    int lo = max(0, i - (n - m));
    a[i] += (pr[hi + 1] - pr[lo] + c) % c;
    a[i] %= c;
    cout << a[i] << (i == n - 1 ? "\n" : " ");
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
