#include <bits/stdc++.h>
using namespace std;
const int MAX = 100010;
int N, M, C;
int a[MAX], b[MAX];
int main() {
  ios::sync_with_stdio(false);
  cin >> N >> M >> C;
  for (int i = 0; i < (N); ++i) cin >> a[i + 1];
  for (int i = 0; i < (M); ++i)
    cin >> b[i + 1], b[i + 1] += b[i], b[i + 1] %= C;
  int l = 0, r = 0;
  for (int i = (1); i <= N; ++i) {
    if (l < M && i > N - M + 1) ++l;
    if (r < M) ++r;
    cout << (a[i] + b[r] - b[l] + C + C) % C << ' ';
  }
  return 0;
}
