#include <bits/stdc++.h>
using namespace std;
inline int modsum(int a, int b, int c);
inline int modsub(int a, int b, int c);
int main(int argc, char* argv[]) {
  int n, m, c, *a, *b, r = 0;
  cin >> n >> m >> c;
  a = new int[n];
  b = new int[m];
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < m; ++i) {
    cin >> b[i];
  }
  for (int i = 0; i < n - m + 1; ++i) {
    for (int j = 0; j < m; ++j) {
      a[i + j] = modsum(a[i + j], b[j], c);
    }
  }
  for (int i = 0; i < n; ++i) {
    cout << a[i] << " ";
  }
  cout << endl;
  return 0;
}
inline int modsum(int a, int b, int c) { return (a + b) % c; }
inline int modsub(int a, int b, int c) {
  int res = (a - b) % c;
  if (res >= 0)
    return res;
  else
    return c + res;
}
