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