#include <bits/stdc++.h>
using namespace std;
int sum[100005], a[100005], b[100005];
int main() {
  int n, m, c;
  while (scanf("%d%d%d", &n, &m, &c) != EOF) {
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
    }
    sum[0] = 0;
    for (int i = 1; i <= m; i++) {
      scanf("%d", &b[i]);
      sum[i] = sum[i - 1] + b[i];
    }
    int total = sum[m];
    for (int i = 1; i <= n; i++) {
      if (i < m) {
        if (i - n + m - 1 > 0)
          a[i] += sum[i] - sum[i - (n - m + 1)];
        else
          a[i] += sum[i];
        a[i] = a[i] % c;
      } else if (i > n - m + 1) {
        if (i + n - m > m)
          a[i] += (total - sum[m - (n - i + 1)]);
        else
          a[i] += (sum[i + n - m] - sum[i - 1]);
        a[i] = a[i] % c;
      } else {
        if (n - m + 1 >= m)
          a[i] += total;
        else
          a[i] += sum[m] - sum[m - n + m - 1];
        a[i] = a[i] % c;
      }
    }
    for (int i = 1; i <= n; i++) {
      if (i != n)
        printf("%d ", a[i]);
      else
        printf("%d\n", a[i]);
    }
  }
  return 0;
}
