def read_data(): L, M, N = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) Q = int(input()) return L, M, N, A, B, Q def solve(L, M, N, A, B, Q): if Q == 1: As = [False] * (N + 1) for ai in A: As[ai] = True counter = 0 for bi in B: if As[bi]: counter += 1 return [counter] A.sort() B.sort() counter = [0] * Q for bi in B: for ai in A: dif = ai - bi if dif < 0: continue if dif >= Q: break counter[dif] += 1 return counter if __name__ == '__main__': L, M, N, A, B, Q = read_data() counter = solve(L, M, N, A, B, Q) for c in counter: print(c)