#include <bits/stdc++.h>
using namespace std;
void read() {
  freopen("pudge.in", "r", stdin);
  freopen("pudge.out", "w", stdout);
}
void faster() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
void pudge() {
  int n, m, c;
  cin >> n >> m >> c;
  int a[n], b[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 = i; j < i + m; j++) {
      a[j] = (a[j] + b[j - i]) % c;
    }
  }
  for (int i = 0; i < n; i++) cout << a[i] << " ";
}
int main() {
  faster();
  pudge();
  return 0;
}
