Var
s,s1:string;
i:integer;
begin
writeln ('Введите строку.');
readln (s);
s1:='';
for i:= 1 to length(s)-1 do
begin
if s[i] <> ' ' then s1:=s1+s[i];
if (s[i] = ' ')and(s[i+1] <> ' ') then s1:=s1+s[i];
end;
s:='';
if s1[1] = ' ' then
for i:= 2 to length(s1) do
s:=s+s1[i]
else
for i:= 1 to length(s1) do
s:=s+s1[i];
writeln(s);
end.