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