#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:214721677")
using namespace std;
template <class T>
T sqr(T a) {
  return (a) * (a);
}
template <class T>
T abs(T a) {
  return (a < 0) ? -(a) : (a);
}
const double Pi = acos(-1.0);
const double eps = 1e-10;
const int INF = 1000 * 1000 * 1000;
const double phi = 0.5 + sqrt(1.25);
int main() {
  int n, m, c;
  scanf("%d%d%d\n", &n, &m, &c);
  vector<int> a(n), b(m);
  for (int i = 0, _n = (n)-1; i <= _n; ++i) scanf("%d", &a[i]);
  scanf("\n");
  for (int i = 0, _n = (m)-1; i <= _n; ++i) scanf("%d", &b[i]);
  vector<int> sum(m + 1);
  sum[1] = b[0];
  for (int i = (2), _b = (m); i <= _b; ++i)
    sum[i] = sum[i] = sum[i - 1] + b[i - 1];
  for (int i = 0, _n = (n)-1; i <= _n; ++i) a[i] += sum[min(i + 1, m)];
  for (int i = (n - m), _b = (n - 1); i <= _b; ++i) a[i] -= sum[i - (n - m)];
  for (int i = 0, _n = (n)-1; i <= _n; ++i) a[i] = (a[i] + c) % c;
  for (int i = 0, _n = (n)-1; i <= _n; ++i) {
    if (i) printf(" ");
    printf("%d", a[i]);
  }
  printf("\n");
  return 0;
}
