#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int x;
	cin>>x;
	cout<<x/10<<'\n'<<x%10;

	return 0;
}