var begin c:=0; Read(n); Read(k); For i:=1 to n do read(a[i]); For i:=1 to n-1 do For j:=n-1 downto i do If a[j]>a[j+1] then begin C:= A[j]; a[j]:=a[j+1]; A[j+1]:=c; End; For i:=1 to n do begin For j:=I to n do If a[i]=a[j] then c:=c+1; If c=k then write(a[i],` `); c:=0; End; End.