#!/bin/python3 import sys def maximumPeople(p, x, y, r): # Return the maximum number of people that will be in a sunny town after removing exactly one cloud. coverage = [] for i in range(len(p)): p.append([]) for i, _y in enumerate(y): radius = r[i] r_left = _y - radius r_right = _y + radius for j in range(r_left, r_right+1): if j <= 0: continue try: coverage[j].append(i) except IndexError: continue places_with_one_cloud = [] for i in range(len(coverage)): if len(coverage[i]) == 1: places_with_one_cloud.append(i) cloud_to_pop_covered = {} for place in places_with_one_cloud: if place in x: index_of_town = x.index(place) cloud_to_pop_covered[coverage[index_of_town][0]] = p[index_of_town] print(cloud_to_pop_covered) if __name__ == "__main__": n = int(input().strip()) p = list(map(int, input().strip().split(' '))) x = list(map(int, input().strip().split(' '))) m = int(input().strip()) y = list(map(int, input().strip().split(' '))) r = list(map(int, input().strip().split(' '))) result = maximumPeople(p, x, y, r) print(result)