n = int(input())

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



print(min(a), max(a), sum(a))
N = eval(input())



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



print(('%d %d %d' % (min(l), max(l), sum(l))))

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

N = eval(input())
l = list(map(int, input().split()))
print(("%d %d %d" % (min(l), max(l), sum(l))))

-n = int(input()) -a = list(map(int, input().split())) -print(min(a), max(a), sum(a)) +N = eval(input()) +l = list(map(int, input().split())) +print(("%d %d %d" % (min(l), max(l), sum(l))))