#include <iostream>
using namespace std;

// write your code here......
void myswap(int *m,int *n)
{
    int temp = *m;
    *m = *n;
    *n =temp;
}
void swap1(int &m,int &n)
{
    int temp = m;
    m = n;
    n = temp;
}

int main() {

    int m, n;
    cin >> m;
    cin >> n;

    // write your code here......
    //myswap(&m,&n);
    swap1(m,n);
    cout << m << " " << n << endl;

    return 0;
}