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