#K1826. Reverse Array

    ID: 24601 Type: Default 1000ms 256MiB

Reverse Array

Reverse Array

You are given an integer n and an array of n integers. Your task is to reverse the array and print the reversed array.

Input Format:
The first line contains an integer n, representing the number of elements in the array. The second line contains n space-separated integers.

Output Format:
Print the reversed array in one line with its elements separated by a space.

Constraints:
$$0 \leq n \leq 10^5$$
Each array element is an integer.

inputFormat

The first line contains a single integer n. The second line contains n space-separated integers.

outputFormat

Output the reversed array as a single line of space-separated integers. If n is 0, output an empty line.## sample

4
1 2 3 4
4 3 2 1

</p>