#include <bits/stdc++.h>
using namespace std;
int num1[100010];
int num2[100010];
int n, m, c;
int find(int i, int j) {
  if (i < 0) return num2[j];
  return num2[j] - num2[i];
}
int main() {
  cin >> n >> m >> c;
  for (int i = 0; i < n; i++) scanf("%d", num1 + i);
  for (int i = 0; i < m; i++) scanf("%d", num2 + i);
  for (int i = m; i < n; i++) num2[i] = 0;
  for (int i = 1; i < n; i++) num2[i] += num2[i - 1];
  for (int i = 0; i < n; i++) {
    num1[i] += find(i - (n - m + 1), i);
    num1[i] %= c;
  }
  for (int i = 0; i < n; i++) {
    cout << num1[i] << " ";
  }
  cout << "\n";
  return 0;
}
