n = int(eval(input()))

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



t = 0



for i in range(n):

    t = t + 1/a[i]

ans = 1/t

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

a =[int(_) for _ in input().split()]



for i in range(len(a)):

  a[i] = 1/a[i]

b = sum(a)

print((1/b))
n = int(eval(input()))
a = list(map(int, input().split()))
t = 0
for i in range(n):
    t = t + 1 / a[i]
ans = 1 / t
print(ans)

n = int(eval(input()))
a = [int(_) for _ in input().split()]
for i in range(len(a)):
    a[i] = 1 / a[i]
b = sum(a)
print((1 / b))

-a = list(map(int, input().split())) -t = 0 -for i in range(n): -    t = t + 1 / a[i] -ans = 1 / t -print(ans) +a = [int(_) for _ in input().split()] +for i in range(len(a)): +    a[i] = 1 / a[i] +b = sum(a) +print((1 / b))