#include <iostream>
using namespace std;
void main()
{
int num;
cin >> num;
while (num>0)
{
cout << num % 10<<endl;
num = num / 10;
}
system("pause");
}
using namespace std;
void main()
{
int num;
cin >> num;
while (num>0)
{
cout << num % 10<<endl;
num = num / 10;
}
system("pause");
}