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