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