#include <bits/stdc++.h>
using namespace std;
long long a[100009], b[100009], s[100009];
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  long long i, j, n, m, c;
  cin >> n >> m >> c;
  for (i = 1; i <= n; i++) cin >> a[i];
  for (i = 1; i <= m; i++) cin >> b[i], s[i] = (b[i] + s[i - 1]);
  long long x = n - m;
  for (i = 1; i <= n; i++) {
    long long t = min(i, m);
    long long g = min(i, min(n + 1 - i, x + 1));
    long long y = s[t] - s[max(t - g, 0ll)];
    a[i] = (a[i] + y) % c;
  }
  for (i = 1; i <= n; i++) cout << a[i] << " ";
}
