#include <bits/stdc++.h>
using namespace std;
long long n, ans, i, b, x, j, a, k, m;
long long c[1234567], d[1234567];
int main() {
  cin >> a >> b >> n;
  for (i = 1; i <= a; i++) {
    cin >> c[i];
    c[i] %= n;
  }
  for (i = 1; i <= b; i++) {
    cin >> d[i];
    d[i] %= n;
  }
  for (i = 1; i <= a - b + 1; i++) {
    for (j = 1; j <= b; j++) {
      c[i + j - 1] += d[j];
      c[i + j - 1] %= n;
    }
  }
  for (i = 1; i <= a; i++) cout << c[i] << " ";
}
