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