#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  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++) {
    int k = i;
    for (int j = 0; j < m; j++) {
      a[k] += b[j];
      a[k] = a[k] % c;
      k++;
    }
  }
  for (int i = 0; i < n; i++) cout << a[i] << " ";
}
