var s1,s2, s, found: string;
i, _pos, len, minlen:byte;
begin
i:=1;
found:='';
write('s1 =>');
readln(s1);
write('s2 =>');
readln(s2);
if length(s1)>length(s2) then minlen:=length(s2) else minlen:=length(s1);
for len := 1 to minlen do
for _pos:=1 to length(s1) - len + 1 do begin
s:=copy(s1,_pos, len);
if pos(s,s2) > 0 then found:=s;
end;
if length(found)>0 then writeln(found) else writeln('no found');
readln;
end.