Candies
Rabbit is celebrating his birthday and has invited m guests. To keep them entertained, he has purchased n boxes of candies, each containing a different number of candies. Specifically, the i-th box contains a_i candies.
As guests arrive throughout the day, each is characterized by a boldness level b_i. This means that upon entering Rabbit's house, a guest will take one candy from each box that contains at least b_i candies. For instance, if Winnie-the-Pooh has a boldness of one, he will take one candy from every box.
After the party, Rabbit wants to know how many candies each guest consumed. Your task is to help him find out.
Input
The first line contains an integer n (1 ≤ n ≤ 100000), representing the number of candy boxes. The second line lists n natural numbers a_i (1 ≤ a_i ≤ 10^9), indicating the number of candies in each box.
The third line contains the integer m (1 ≤ m ≤ 100000), which is the number of guests. The fourth line provides m numbers b_i (1 ≤ b_i ≤ 10^9), representing the boldness of each guest.
Output
For each guest, print a line with the number of candies they ate.