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

namespace ConsoleApplication31
{
    class Program
    {
        static void zameni(ref int x, ref int y)
        {
            int pom=x;
            x=y;
            y=pom;
        }
        static void Main(string[] args)
        {
            string[] s;
            int n;
            n = int.Parse(Console.ReadLine());
            int[] niz = new int[n];
            s = Console.ReadLine().Split();
            for (int i = 0; i < n; i++)
            {
                niz[i] = int.Parse(s[i]);
            }
            if (n == 2)
            {
                zameni(ref niz[0], ref niz[1]);
            }
            for (int i = 0; i < n; i++)
            {
                Console.Write(niz[i] + " ");
            }
        }
    }
}