#include <bits/stdc++.h>
using namespace std;
long long n, m, c;
long long a[100005], b[100005];
int main() {
  cin >> n >> m >> c;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= m; ++i) cin >> b[i];
  long long tmp = 0;
  int pos = 1;
  for (int i = 1; i <= n; ++i) {
    if (i <= m) tmp += b[i];
    if (i > n - m + 1) {
      tmp -= b[pos];
      pos++;
    }
    a[i] += tmp;
    a[i] %= c;
  }
  for (int i = 1; i <= n; ++i) cout << a[i] << " ";
  return 0;
}
