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