var
s,temp,s1:string;
i:integer;
begin
readln(s);
s1:='';
for i:=1 to length(s) do
begin
if s[i]<>' ' then
temp:=temp+s[i]
else
begin
if (s1='') and (temp<>'') then
s1:=temp;
if (temp<>'') and(length(temp)<length(s1)) then
s1:=temp;
temp:=''
end;
end;
if s1<>'' then
writeln(s1)
end.