#include <bits/stdc++.h>
using namespace std;
int a[100005];
int b[100005];
int k[100005];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m, c;
  cin >> n >> m >> c;
  for (int i = 1; i <= n; i++) cin >> a[i];
  k[0] = 0;
  for (int i = 1; i <= m; i++) {
    cin >> b[i];
  }
  for (int i = 1; i <= n; i++) k[i] = b[i] + k[i - 1];
  int l = n - m + 1;
  for (int i = 1; i <= n; i++) {
    if (i - l < 0) {
      a[i] += k[i];
      a[i] %= c;
    } else {
      a[i] += k[i] - k[i - l];
      a[i] %= c;
    }
  }
  for (int i = 1; i <= n; i++) cout << a[i] << " ";
  return 0;
}
