#include <bits/stdc++.h>
using namespace std;
int a[100005], b[100005];
int n, m, c;
int main() {
  scanf("%d%d%d", &n, &m, &c);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= m; i++) scanf("%d", &b[i]);
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    if (i >= n - m + 1) sum -= b[i - n + m - 1];
    if (i <= m) sum += b[i];
    a[i] = (a[i] + sum % c) % c;
  }
  for (int i = 1; i <= n; i++) printf("%d ", a[i]);
  return 0;
}
