#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n,a,b;
    cin >> n;
    if(n==2)
    {
        cin >> a >> b;
        cout << b <<" "<< a;
    }
    return 0;
}