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): 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)