#include <bits/stdc++.h>
using namespace std;
int n, m, c;
vector<int> a, b;
int main() {
  cin >> n >> m >> c;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a.push_back(x);
  }
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    b.push_back(x);
  }
  int sum = 0, l = 0;
  for (int i = 0; i < n; i++) {
    if (i < m) sum += b[i];
    if (n - i < m) sum -= b[l++];
    a[i] += sum;
    a[i] %= c;
    cout << a[i] << ' ';
  }
}
