#include <bits/stdc++.h>
using namespace std;
long long i, a[1000000], b[1000000], d, m, l, n, k, ans;
string ss, s;
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(NULL);
  cin >> n >> m >> d;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (i = 1; i <= m; i++) {
    cin >> b[i];
  }
  for (i = 1; i <= n - m + 1; i++) {
    for (l = i; l <= i + m - 1; l++) {
      a[l] += b[l - i + 1];
    }
  }
  for (i = 1; i <= n; i++) {
    cout << a[i] % d << " ";
  }
}
