#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, m, c;
  cin >> n >> m >> c;
  vector<long long int> a(n), b(m);
  for (auto &i : a) cin >> i;
  for (auto &i : b) cin >> i;
  long long int op = n - m + 1;
  long long int k = 0;
  long long int j = 0;
  while (op--) {
    for (int i = 0; i < m; i++) {
      a[k] = (a[k] + b[i]) % c;
      k++;
      if (k == n) break;
    }
    k = ++j;
  }
  for (auto i : a) cout << i << " ";
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  srand(chrono::high_resolution_clock::now().time_since_epoch().count());
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
