#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long n, m, c;
long long a[N], b[N];
long long sum;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> c;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  for (long long i = 1; i <= m; i++) cin >> b[i];
  long long j = 1;
  for (long long i = 1; i <= n; i++) {
    if (i <= m) sum += b[i];
    if (i > n - m + 1) sum -= b[j++];
    a[i] = (a[i] + sum) % c;
  }
  for (long long i = 1; i <= n; i++) cout << a[i] << " ";
  return 0;
}
