#include <bits/stdc++.h>
using namespace std;
const int MXN = 2 * 1e5 + 5;
const long long INF = 1e18;
void solve() {
  int n, m, c;
  cin >> n >> m >> c;
  vector<long long> a(n + 1), b(m + 1);
  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 <= n - m + 1; i++) {
    for (int j = 1; j <= m; j++) {
      a[j + i - 1] = (a[j + i - 1] + b[j]) % c;
    }
  }
  for (int i = 1; i <= n; i++) cout << a[i] << " ";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int tt = 1;
  for (int i = 1; i <= tt; i++) {
    solve();
  }
  return 0;
}
