program xxx;
uses crt;
var s:string;
procedure DelSpaces(var s: string);
begin
while (s[1]=' ') and (length(s)>0) do
s:=copy(s,2,length(s)-1);
end;
procedure Words(s:string);
var slovo: string;
begin
s:=s+' ';
DelSpaces(s);
while s<>'' do
begin
slovo:=copy(s,1, pos(' ',s)-1);
slovo:=upcase(slovo[1])+copy(slovo,2, length(slovo)-1);
write(slovo,' ');
delete(s,1, length(slovo));
delspaces(s);
end;
end;
BEGIN
clrscr;
writeln('Ââåäèòå òåêñò');
readln(s);
words(s);
readln;
End.