#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int n, m, c;
vector<int> a, b;
void solve() {
  int k = 0, sum = 0;
  for (int i = 0; i < n; i++) {
    if (i < m) {
      sum = (sum + b[k++]) % c;
    }
    a[i] = (a[i] + sum) % c;
  }
  k--;
  for (int i = n - 1; i >= n - m; i--) {
    sum = (sum - b[k--]) % c;
    if (sum < 0) sum += c;
    a[i] = (a[i] - sum) % c;
    if (a[i] < 0) a[i] += c;
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", a[i]);
  }
  printf("\n");
}
int main() {
  while (cin >> n >> m >> c) {
    a = vector<int>(n);
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    b = vector<int>(m);
    for (int i = 0; i < m; i++) {
      scanf("%d", &b[i]);
    }
    solve();
  }
}
