import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int L = sc.nextInt(); int M = sc.nextInt(); int N = sc.nextInt(); boolean[] A = new boolean[N]; for (int i = 0; i < L; i++) { A[sc.nextInt() - 1] = true; } boolean[] B = new boolean[N]; for (int i = 0; i < M; i++) { B[sc.nextInt() - 1] = true; } int Q = sc.nextInt(); sc.close(); int[] cnt = new int[Q]; for (int i = 0; i < N; i++) { for (int q = 0; q < Q; q++) { if (i + q >= N) { break; } if (A[i + q] && B[i]) { cnt[q]++; } } } for (int i = 0; i < cnt.length; i++) { System.out.println(cnt[i]); } } }