#include <bits/stdc++.h>
using namespace std;
int main() {
  register int n, m, c;
  cin >> n >> m >> c;
  register int* a = new int[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) {
    int b;
    cin >> b;
    for (int j = i; j < n - m + 1 + i; j++) a[j] = (a[j] + b) % c;
    cout << a[i] << " ";
  }
  for (int i = m; i < n; i++) cout << a[i] << " ";
  delete[] a;
  return 0;
}
