#include <iostream>
#include <stdio.h>
using namespace std;

int main()
{
    int N;
    cin >>N;
    int a,b;
    cin>>a>>b;
    int i;
    if(a<b)
        {i=b;
        b=a;
        a=i;}
    else {a=a;
    b=b;}
    cout << a <<" "<< b ;

    return 0;
}