var
s:string;
i,n:integer;
begin
read(s);
for i:=1 to length(s) do
begin
n+=1;
if(s[i]=' ') then
begin
s[i-n+1]:=upcase(s[i-n+1]);
s[i-1]:=upcase(s[i-1]);
n:=0;
end;
if(i=length(s)) then
begin
s[i-n+1]:=upcase(s[i-n+1]);
s[i]:=upcase(s[i]);
write(s);
exit;
end;
end;
end.