#include <bits/stdc++.h>
using namespace std;
int digits1[10] = {0}, digits2[10] = {0};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, c;
  cin >> n >> m >> c;
  vector<int> a(n), b(m);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) cin >> b[i];
  long sum = 0;
  int x = -(n - m + 2);
  for (int i = 0; i < n; i++) {
    if (i < m) sum += b[i];
    x++;
    if (x >= 0) sum -= b[x];
    a[i] = (a[i] + sum) % c;
  }
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  cout << "\n";
  return 0;
}
