# 6 2 3 # 2 1 # 3 4 5 6 1 # 2 3 4 5 6 import collections n,m,d = map(int,input().strip().split()) l = list(map(int,input().strip().split())) w = list(map(int,input().strip().split())) a = collections.defaultdict(int) # child -> father b = collections.defaultdict(int) # father -> child for i ...