#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
long long power(long long a, long long b) {
  if (b == 0) return 1;
  long long res = power(a, b / 2);
  long long ans = res * res;
  ans %= mod;
  if (b % 2 == 0) return ans;
  return (a * ans) % mod;
}
template <typename T>
bool sortbysec(const pair<T, T> &a, const pair<T, T> &b) {
  return (a.second < b.second);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  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];
  ;
  vector<long long> diff(n + 5);
  for (int i = 0; i < m; i++) {
    int l = i, r = i + n - m;
    diff[l] += b[i];
    diff[r + 1] -= b[i];
  }
  for (int i = 0; i < n; i++) {
    if (i) diff[i] += diff[i - 1];
    a[i] += diff[i] % c;
    a[i] %= c;
  }
  for (auto e : a) cout << e << " ";
  cout << "\n";
  return 0;
}
