#include <iostream>

using namespace std;

int main()
{
    int n,a,b;
    cin >> n;
    cin >> a >> b;
    if (a < b) {
        cout << a << " " << b;
    } else {
        cout << b << " " << a;
    }
    return 0;
}