#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int a[maxn];
int b[maxn];
int main() {
  ios::sync_with_stdio(false);
  int n, m, c;
  scanf("%d %d %d", &n, &m, &c);
  for (int i = 1; i < n + 1; ++i) scanf("%d", &a[i]);
  for (int i = 1; i < m + 1; ++i) {
    scanf("%d", &b[i]);
    b[i] = (b[i] + b[i - 1]) % c;
  }
  int i, j, k;
  if (n >= m + m) {
    for (i = 1; i <= m; ++i) a[i] = (a[i] + b[i]) % c;
    for (i = n, j = m; j > 0; --i, --j) a[i] = (a[i] + b[m] - b[j - 1] + c) % c;
    for (; i > m; --i) a[i] = (a[i] + b[m]) % c;
  } else {
    k = n - m + 1;
    for (i = 1; i <= k; ++i) a[i] = (a[i] + b[i]) % c;
    for (j = 1; i <= m; ++i, ++j) a[i] = (a[i] + b[j + k] - b[j] + c) % c;
    for (j = m + 1 - k; i <= n; ++i, ++j) {
      a[i] = (a[i] + b[m] - b[j] + c) % c;
    }
  }
  for (i = 1; i <= n; ++i) printf("%d ", a[i]);
  putchar('\n');
  return 0;
}
