#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
int a[maxn], ans[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, c;
  cin >> n >> m >> c;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) {
    int val;
    cin >> val;
    ans[i] += val;
    ans[i + n - m + 1] -= val;
  }
  ans[0] %= c;
  for (int i = 1; i < n; i++) ans[i] = (ans[i] + ans[i - 1]) % c;
  for (int i = 0; i < n; i++) cout << ((a[i] + ans[i]) % c + c) % c << " ";
  cout << endl;
  return 0;
}
