#include<stdio.h>
#include<string.h>
#define max 1000002
char s[max];
int main()
{
int f = 0;
gets(s);
int lens = strlen(s);
for (int i = 0; i <= lens; ++i)
{
if (s[i] == ' ') {
f = 0;
}
else {
f++;
}
if (f % 2 != 0) {
s[i] -= 32;
}
}
for (int i =0; i < lens; ++i)
{
printf("%c", s[i]);
}
return 0;
}