eval(input())

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

print((min(ia),max(ia),sum(ia)))
# encoding:utf-8



count = eval(input())

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



min = min(input)

max =max(input) 

sum = sum(input)



print((min), end=' ')

print((max), end=' ')

print(sum)
eval(input())
ia = [int(i) for i in input().split(" ")]
print((min(ia), max(ia), sum(ia)))

# encoding:utf-8
count = eval(input())
input = list(map(int, input().split()))
min = min(input)
max = max(input)
sum = sum(input)
print((min), end=" ")
print((max), end=" ")
print(sum)

-eval(input()) -ia = [int(i) for i in input().split(" ")] -print((min(ia), max(ia), sum(ia))) +# encoding:utf-8 +count = eval(input()) +input = list(map(int, input().split())) +min = min(input) +max = max(input) +sum = sum(input) +print((min), end=" ") +print((max), end=" ") +print(sum)