sum = 0

max = -10000000

min = 10000000



eval(input())



for i in [int(x)  for x in input().split()]:

    sum += i

    if i > max:

        max = i



    if i < min:

        min = i

print((min, max, sum))
eval(input())



data = [int(x) for x in input().split()]



print((min(data), max(data), sum(data)))
sum = 0
max = -10000000
min = 10000000
eval(input())
for i in [int(x) for x in input().split()]:
    sum += i
    if i > max:
        max = i
    if i < min:
        min = i
print((min, max, sum))

eval(input())
data = [int(x) for x in input().split()]
print((min(data), max(data), sum(data)))

-sum = 0 -max = -10000000 -min = 10000000 -for i in [int(x) for x in input().split()]: -    sum += i -    if i > max: -        max = i -    if i < min: -        min = i -print((min, max, sum)) +data = [int(x) for x in input().split()] +print((min(data), max(data), sum(data)))