Var
S: string;
i, k: integer;
b: boolean;
begin
readln(s);
var n := Length(s);
i := 1;
repeat
b := true;
while (i <= n) and (s[i] <> ' ') do
begin
if b then
begin
k := i;
b := false
end;
inc(i)
end;
if i - k = 4 then
begin
delete(s, k, 5);
i := k;
n := n - 5
end
else inc(i)
until i > n;
write(s)
end.