#include <stdio.h>
#include
#include
#include
using namespace std;
int main()
{
string s;
cin >> s;
string str = "";
int l = s.length();
for (int i = 0; i < l; i++)
{
char ch = s[i];
if (ch >= 'A' && ch <= 'Z')
{
cout << ch;
}
else if (ch >= 'a' && ch <= 'z')
{
cout << ch;
}
else if (ch >= 'A' && ch <= 'Z')
{
cout << endl;
cout << ch;
}
}
return 0;
}