editor1
 try:
    n = int(input())
    amounts = input().split()
    new_amount = input()

    # Check if number of amounts matches n
    if len(amounts) != n:
        raise ValueError

    # Convert all to float (will raise error if invalid)
    amounts = [float(a) for a in amounts]
    new_amount = float(new_amount)

    amounts.append(new_amount)

    print(" ".join(str(a) for a in amounts))

except:
    print("Invalid input")