var i,j:integer; s:string;
begin
read(s);
writeln;
for i:=1 to length(s) do
for j:=0 to i-1 do
if (s[i]<>s[j]) or (s[i]=' ') then for j:=i+1 to length(s) do if (s[i]<>s[j]) or (s[i]=' ') then write(s[i],' ');
end;
end.
var i,j:integer; s:string;
begin
read(s);
writeln;
for i:=1 to length(s) do
begin
for j:=0 to i-1 do
if (s[i]<>s[j]) or (s[i]=' ') then for j:=i+1 to length(s) do if (s[i]<>s[j]) or (s[i]=' ') then write(s[i],' ');
end;
end.