#include <stdio.h>

void change(char *p){
	//alex apple 
	*p++ -= 32;//a-> -32 ->A
	while(*p != '#'){
		if(*(p-1) == ' '){
			*p -= 32;
		}
		p++;
	}
	*p = '\0';
}

int main(){
	char str[1024];
	
	gets(str);//读取一行字符串 回车判定结束 
	change(str);
	puts(str);
	

	return 0;
}