from functools import reduce

eval(input())

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

print((1 / reduce(lambda x, y: x + 1/y, [0] + a)))

eval(input())

print((1 / sum(1/int(x) for x in input().split())))

from functools import reduce

eval(input())
a = [int(i) for i in input().split()]
print((1 / reduce(lambda x, y: x + 1 / y, [0] + a)))

eval(input())
print((1 / sum(1 / int(x) for x in input().split())))

-from functools import reduce - -a = [int(i) for i in input().split()] -print((1 / reduce(lambda x, y: x + 1 / y, [0] + a))) +print((1 / sum(1 / int(x) for x in input().split())))