using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication6
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int[] a = new int[n];
            string[] str = new string[n];
            str = Console.ReadLine().Split(' ');
            for (int i = 0; i < n; i++) a[i] = int.Parse(str[i]);
            if (n == 2) Console.WriteLine(a[1] + " " + a[0]);
            else
            {
                for (int i = 0; i < n; i++) Console.Write(a[i] + " ");
            }
        }
    }
}