Given an array of N elements and Q queries. Each query containing an integer X. For each query print the Xth smallest number of the input array.
Note : Don't use any predefined function. Try to make your own code.
Constraints
1 <= N <= 105
1 <= Value of element of array <= 1018
1 <= Q <= 106
1 <= X <= N
Input
First line contains value N. Next line contains N integers separated by a single space. Third line contains value Q. Next line contains Q integers separated by a space.