#include <bits/stdc++.h>
using namespace std;
long long n, m, c, a[100002], b[100002];
long long sum[100005];
int main() {
  cin >> n >> m >> c;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) {
    cin >> b[i];
    if (i > 0)
      sum[i] = sum[i - 1] + b[i];
    else
      sum[i] = b[i];
  }
  int Min = 0, Max = 0;
  for (int i = 0; i < n; i++) {
    if (m > n - i) Min++;
    int now = sum[Max];
    if (Min > 0) now -= sum[Min - 1];
    a[i] += now;
    a[i] %= c;
    if (Max < m - 1) Max++;
    cout << a[i] << ' ';
  }
  cout << endl;
  return 0;
}
