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