#include <bits/stdc++.h>
using namespace std;
long long arr[100005];
long long enc[100005];
long long sum[100005];
int main() {
  int n, m, c;
  cin >> n >> m >> c;
  for (int i = 0; i < n; i++) scanf("%lld", &arr[i]);
  for (int i = 0; i < m; i++) {
    scanf("%lld", &enc[i]);
    sum[i] = enc[i];
  }
  for (int i = 1; i < n; i++) sum[i] += sum[i - 1];
  for (int i = 0; i < n - m + 1; i++) {
    arr[i] += sum[i];
    arr[i] %= c;
  }
  for (int i = n - m + 1; i < n; i++) {
    arr[i] += sum[i] - sum[i + m - n - 1];
    arr[i] %= c;
  }
  for (int i = 0; i < n; i++) printf("%lld ", arr[i]);
}
