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