#include <bits/stdc++.h>
using namespace std;
using LL = long long;
constexpr int N = 1e5 + 5;
int a[N], b[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m, c;
  cin >> n >> m >> c;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= m; i++) {
    cin >> b[i];
    (b[i] += b[i - 1]) %= c;
  }
  for (int i = 1; i <= n; i++) {
    int j = min(i, m);
    int len = min({j, n - m + 1, n - i + 1});
    cout << (a[i] + c + b[j] - b[j - len]) % c << ' ';
  }
}
