#include <bits/stdc++.h>
using namespace std;
int asli[1000 * 101], code[1000 * 101], ramz[1000 * 101];
int main() {
  int n, m, c;
  cin >> n >> m >> c;
  for (int i = 0; i < n; i++) {
    cin >> asli[i];
  }
  for (int i = 0; i < m; i++) cin >> code[i];
  for (int i = 0; i < n - m + 1; i++) {
    for (int j = 0; j < m; j++) {
      int shuru = i + j;
      ramz[shuru] = (asli[i + j] + code[j]) % c;
      asli[shuru] = ramz[shuru];
    }
  }
  for (int i = 0; i < n; i++) cout << ramz[i] << " ";
}
