begin Assign(f, 'input.txt'); Reset(f); Readln(f, s); Close(f); Assign(f, 'output.txt'); Rewrite(f); n := Length(s); sm := Copy(s, 2, n - 1); for i := 2 to n do begin si := s; Delete(si, i, 1); if sm < si then sm := si end; Writeln(f, sm); Close(f) end.
s, si, sm: string;
i, n: integer;
f: Text;
begin
Assign(f, 'input.txt');
Reset(f);
Readln(f, s);
Close(f);
Assign(f, 'output.txt');
Rewrite(f);
n := Length(s);
sm := Copy(s, 2, n - 1);
for i := 2 to n do
begin
si := s;
Delete(si, i, 1);
if sm < si then sm := si
end;
Writeln(f, sm);
Close(f)
end.