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