import heapq def solve(): N = int(input()) L = list(map(int, input().split())) Q = int(input()) K = list(map(int, input().split())) h = [] for i in range(N): heapq.heappush(h, (-L[i], 1, i)) MAX = 500001 A = [0.0] * MAX for j in range(1, MAX): l, n, i = heapq.heappop(h) A[j] = -l heapq.heappush(h, (-L[i] / (n + 1), n + 1, i)) for k in K: print(A[k]) def main(): solve() if __name__ == '__main__': main()