eval(input())

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

print(("{0} {1} {2}".format(min(nums), max(nums), sum(nums))))
line = eval(input())

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



print(f"{min(nums)} {max(nums)} {sum(nums)}")

eval(input())
nums = [int(x) for x in input().split(" ")]
print(("{0} {1} {2}".format(min(nums), max(nums), sum(nums))))

line = eval(input())
nums = list(map(int, input().split()))
print(f"{min(nums)} {max(nums)} {sum(nums)}")

-eval(input()) -nums = [int(x) for x in input().split(" ")] -print(("{0} {1} {2}".format(min(nums), max(nums), sum(nums)))) +line = eval(input()) +nums = list(map(int, input().split())) +print(f"{min(nums)} {max(nums)} {sum(nums)}")