Program HOC24;
var a: array[1..32000] of integer;
i,j,n: integer;
begin
write('Nhap so phan tu : '); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
for i:=1 to n do
for j:=i to n do
if a[i]=a[j] then write(a[i],' ');
readln
end.