Moscow is hosting a major international conference, which is attended by *n* scientists from different countries. Each of the scientists knows exactly one language. For convenience, we enumerate all languages of the world with integers from 1 to 10<sup class="upper-index">9</sup>.

In the evening after the conference, all *n* scientists decided to go to the cinema. There are *m* movies in the cinema they came to. Each of the movies is characterized by two distinct numbers — the index of audio language and the index of subtitles language. The scientist, who came to the movie, will be very pleased if he knows the audio language of the movie, will be almost satisfied if he knows the language of subtitles and will be not satisfied if he does not know neither one nor the other (note that the audio language and the subtitles language for each movie are always different). 

Scientists decided to go together to the same movie. You have to help them choose the movie, such that the number of very pleased scientists is maximum possible. If there are several such movies, select among them one that will maximize the number of almost satisfied scientists.
The first line of the input contains a positive integer *n* (1 ≤ *n* ≤ 200 000) — the number of scientists.

The second line contains *n* positive integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>), where *a*<sub class="lower-index">*i*</sub> is the index of a language, which the *i*-th scientist knows.

The third line contains a positive integer *m* (1 ≤ *m* ≤ 200 000) — the number of movies in the cinema. 

The fourth line contains *m* positive integers *b*<sub class="lower-index">1</sub>, *b*<sub class="lower-index">2</sub>, ..., *b*<sub class="lower-index">*m*</sub> (1 ≤ *b*<sub class="lower-index">*j*</sub> ≤ 10<sup class="upper-index">9</sup>), where *b*<sub class="lower-index">*j*</sub> is the index of the audio language of the *j*-th movie.

The fifth line contains *m* positive integers *c*<sub class="lower-index">1</sub>, *c*<sub class="lower-index">2</sub>, ..., *c*<sub class="lower-index">*m*</sub> (1 ≤ *c*<sub class="lower-index">*j*</sub> ≤ 10<sup class="upper-index">9</sup>), where *c*<sub class="lower-index">*j*</sub> is the index of subtitles language of the *j*-th movie.

It is guaranteed that audio languages and subtitles language are different for each movie, that is *b*<sub class="lower-index">*j*</sub> ≠ *c*<sub class="lower-index">*j*</sub>.
In the first sample, scientists must go to the movie with the index 2, as in such case the 1-th and the 3-rd scientists will be very pleased and the 2-nd scientist will be almost satisfied.

In the second test case scientists can go either to the movie with the index 1 or the index 3. After viewing any of these movies exactly two scientists will be very pleased and all the others will be not satisfied.
3
2 3 2
2
3 2
2 3
2
6
6 3 1 1 3 7
5
1 2 3 4 5
2 3 4 5 1
1
1
10
1
10
3
1
2
1 6
1
6
1
1
1
5
2
2 2
5 5
1
2
4 4
2
4 7
7 5
1
10
3 1 8 8 1 1 5 1 3 5
2
1 4
3 1
1
10
7 6 1 2 7 3 9 7 7 9
10
2 9 6 5 9 3 10 3 1 6
4 6 7 9 7 4 1 9 2 5
5
20
2 2 1 6 6 5 10 2 5 5 4 8 6 8 8 10 2 1 5 6
20
1 9 1 1 5 1 9 10 1 10 9 9 8 7 5 1 1 10 2 7
3 5 9 10 10 8 2 9 6 7 8 8 6 5 3 4 6 3 7 4
5
2
10 8
10
8 3 10 8 8 8 3 8 8 8
10 10 8 3 10 3 8 3 10 10
1
5
9 9 2 4 2
5
4 1 1 1 2
2 4 4 9 7
5
1
320994883
1
332200603
942930950
1
3
1000000000 1 1000000000
2
1000000000 1
1 1000000000
1
5
1 2 3 3 4
2
1 2
3 4
1
3
1 3 2
2
1 3
2 4
1
5
2 2 3 3 4
3
5 2 2
6 3 4
2
2
1 2
2
3 3
4 1
2
12
3 2 1 1 4 4 5 1 6 6 7 7
4
3 2 4 7
2 1 5 6
4
14
1 1 2 2 2 3 3 3 4 5 5 5 6 6
3
1 3 5
2 6 4
2
n= int(input())  
arr=list(map(int,input().rstrip().split()))
arr.sort()
m=int(input())
arr1=list(map(int,input().rstrip().split()))
arr2=list(map(int,input().rstrip().split()))


count1=0 
r=0
rr=0
for i in range(m):
    count=0
    for e in range(n):
        if arr1[i]==arr[e]:
            count+=3
        elif arr2[i]==arr[e]:
            count+=1
    if count>count1:
        rr+=1
        count1=count
        r=i+1
if rr==0:
   print(r+1)            
else:
    print(r)
        