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