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