n = int(eval(input()))

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



a = min(t)

b = max(t)

c = sum(t)



print((str(a),str(b),str(c)))
n = eval(input())

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

print((min(Input),max(Input),sum(Input)))

n = int(eval(input()))
t = list(map(int, input().split()))
a = min(t)
b = max(t)
c = sum(t)
print((str(a), str(b), str(c)))

n = eval(input())
Input = list(map(int, input().split()))
print((min(Input), max(Input), sum(Input)))

-n = int(eval(input())) -t = list(map(int, input().split())) -a = min(t) -b = max(t) -c = sum(t) -print((str(a), str(b), str(c))) +n = eval(input()) +Input = list(map(int, input().split())) +print((min(Input), max(Input), sum(Input)))