#include <bits/stdc++.h>
using namespace std;
int seq[100050];
int key[100050];
int key1[100050];
int key2[100050];
int main() {
  int n;
  int m;
  int c;
  scanf("%d %d %d", &n, &m, &c);
  for (int i = 0; i < n; i++) scanf("%d", &seq[i]);
  for (int i = 0; i < m; i++) scanf("%d", &key[i]);
  key1[0] = key[0];
  for (int i = 1; i < m; i++) key1[i] = key1[i - 1] + key[i];
  key2[0] = key[m - 1];
  for (int i = 1; i < m; i++) key2[i] = key[m - 1 - i] + key2[i - 1];
  for (int i = 0; i < n / 2; i++) {
    seq[i] += key1[min(i, m - 1)] - (min(i, m - 1) - (n - m + 1) >= 0
                                         ? key1[min(i, m - 1) - (n - m + 1)]
                                         : 0);
    seq[i] %= c;
  }
  for (int i = n - 1; i >= n / 2; i--) {
    seq[i] += key2[min((n - 1) - i, m - 1)] -
              (min((n - 1) - i, m - 1) - (n - m + 1) >= 0
                   ? key2[min((n - 1) - i, m - 1) - (n - m + 1)]
                   : 0);
    seq[i] %= c;
  }
  for (int i = 0; i < n; i++) printf("%d%c", seq[i], (i == n - 1 ? '\n' : ' '));
  return 0;
}
