#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 15;
const int64_t INF = 100000000000000018LL;
vector<vector<long long>> graph(N);
void solve() {
  long long n, m, c;
  cin >> n >> m >> c;
  long long a[n + 5], b[m + 5], pref[m + 5], i;
  for (i = 1; i <= n; i++) cin >> a[i];
  for (i = 1; i <= m; i++) cin >> b[i];
  map<long long, long long> mpp;
  for (i = 1; i <= m; i++) {
    long long l = i;
    long long r = n - m + i;
    mpp[l] += b[i];
    mpp[r + 1] -= b[i];
  }
  for (i = 1; i <= n; i++) mpp[i] += mpp[i - 1];
  for (i = 1; i <= n; i++) {
    cout << (a[i] + mpp[i] + c) % c << " ";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
}
