LearnPy Hub
← Arena
EasyRating 800

Swap First and Last

Swap the first and last numbers of the list and print it.

Input

n, then n integers.

Output

The list.

Sample 1

Input
4
1 2 3 4
Output
4 2 3 1

Sample 2

Input
1
9
Output
9
solution.py
Output appears here
Swap First and Last · Python Arena problem · LearnPy Hub