while 1:
try:
num = int(input())
dp = [[num]]
def dfs(n):
total =
while 1:
try:
num = int(input())
dp = [[num]]
def dfs(n):
total =