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