CodeLab Academy 📞 9936 6696
← List Python · Level 7: Lists Code · 70 points ← #666 #668 →

#667. Swap the first and the last

Swap the first and the last elements and print the list. ### Input The first line has n, the second line has n integers separated by spaces. ### Output One line.

Examples

Input
3
39 9 24
Output
24 9 39
Input
4
48 24 6 47
Output
47 24 6 48

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!