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

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