#include <iostream>
using namespace std;
int main()
{
int number;
cin >> number;
cout << number % 10 << ' ' << number / 10 % 10;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int number;
cin >> number;
cout << number % 10 << ' ' << number / 10 % 10;
return 0;
}