#include <bits/stdc++.h>
using namespace std;
int n, m, r;
int a[111111];
int b[111111];
int c[111111];
int main() {
  cin >> n >> m >> r;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= m; i++) cin >> b[i];
  for (int i = 1; i <= m; i++) {
    c[i] += b[i];
    c[i + n - m + 1] -= b[i];
    c[i] = (c[i] + r) % r;
    c[i + n - m + 1] = (c[i + n - m + 1] + r) % r;
  }
  int t = 0;
  for (int i = 1; i <= n; i++) {
    if (i != 1) cout << " ";
    t += c[i] + r;
    t %= r;
    cout << (a[i] + t) % r;
  }
  cout << endl;
}
