Combined scoreboard

Combined scoreboard

Time Limit: 2.0 s

Memory Limit: 512.0 MB

Description

The result of "LUCC Carnival 2.0" programming contest has been published. There were \(N\) participants in total in the main contest.

After some day, the organizer comittee set to reply the contest for those who did not participate in the main contest. Total \(M\) people participated in the replay of the contest.

Now, the participants of the reply contest are curious to know what would be their position in the main contest scoreboard if they had participated in the main contest according to the score of the raply contest.

In other words you have to find the position of \(M\) contestants of the reply contest in the combined scoreboard of main contest and reply contest.

Note: if two contestant of reply contest have same score place him first in the combined scoreboard who comes first in the list of reply contest. And place the contestant of main contest first when two people from two contest have the same score. See the sample test case for more clarification.

Input

First line takes an integer \(N\) : number of participants in the main contest
second line takes \(N\) integers : scoreboard of main contest
third line takes an integer \(M\) : number of participants in the reply contest
fourth line takes \(M\) integers : scoreboard of reply contest

\(1 <= N,M <= 10^5\)
Score of any contestant will not exceed \(10^9\)

Output

print \(M\) integer in a single line : \(i\)-th integer should represent the position of \(i\)-th participants of reply contest in the combined scoreboard.
Note: do not print a newline in answer

Sample

Input Output
3
5 1 3
4
2 5 5 4
6 2 3 4 

in the given testcase the combined scoreboard is : 5 5 5 4 3 2 1
the positions of the participants of reply contest are marked as bold.

Information

ID
1049
Difficulty
4
Category
(None)
Tags
(None)
# Submissions
44
Accepted
19
Accepted Ratio
43%
Uploaded By

Related

In following contests:

Brain Booster #3