from collections import deque



N = int(eval(input()))

H = deque(list(map(int, input().split())))



h = deque(sorted(H))



ans = h.popleft()

for i in range(N-1):

    ans = (ans + h.popleft())/2



print(ans)
N = int(eval(input()))

H = list(map(int, input().split()))



h = sorted(H, reverse=True)

ans = h.pop()



for i in range(N-1):

    ans = (ans + h.pop())/2



print(ans)
from collections import deque

N = int(eval(input()))
H = deque(list(map(int, input().split())))
h = deque(sorted(H))
ans = h.popleft()
for i in range(N - 1):
    ans = (ans + h.popleft()) / 2
print(ans)

N = int(eval(input()))
H = list(map(int, input().split()))
h = sorted(H, reverse=True)
ans = h.pop()
for i in range(N - 1):
    ans = (ans + h.pop()) / 2
print(ans)

-from collections import deque - -H = deque(list(map(int, input().split()))) -h = deque(sorted(H)) -ans = h.popleft() +H = list(map(int, input().split())) +h = sorted(H, reverse=True) +ans = h.pop() -    ans = (ans + h.popleft()) / 2 +    ans = (ans + h.pop()) / 2