#include <bits/stdc++.h>
const long long N = 3e5 + 10;
const long long inf = 2e5 + 100;
using namespace std;
struct item {
  long long x;
  long long y;
};
bool comp(item a, item b) { return a.x < b.x; }
bool comp2(item a, item b) { return a.y < b.y; }
bool comp3(item a, item b) {
  if (a.x == b.x) {
    return a.y < b.y;
  }
  return a.x < b.x;
}
int main() {
  int n, m, c;
  cin >> n >> m >> c;
  vector<int> a(n + 1), b(m + 1), psum(m + 2);
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= m; i++) {
    cin >> b[i];
  }
  for (int i = 1; i <= m; i++) {
    psum[i] += psum[i - 1] + b[i];
  }
  int st = 1;
  int en = 1;
  for (int i = 1; i <= n; i++) {
    a[i] += psum[en] - psum[st - 1];
    a[i] %= c;
    en++;
    en = min(en, m);
    if (i >= n - m + 1) {
      st++;
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << a[i] << " ";
  }
  cout << "\n";
}
