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