program povtory; uses crt; const n = 30; var f, q: text; fl: boolean; i, j, value, curr: integer; begin clrscr; randomize; assign(f,'fail.in'); rewrite(f); for i:=1 to n do writeln(f,random(20)); reset(f); assign(q,'fail.out'); rewrite(q); for i := 1 to n do begin fl := true; readln(f, value); while not EOF(f) and fl do begin readln(f, curr); if value = curr then fl := false; end; reset(f); for j:=1 to i-1 do begin readln(f, curr); if fl and (value = curr) then fl := false; end; readln(f, value); if fl then writeln(q, value); end; close(f); close(q); end.