var a:array[1..2,1..30] of integer;
i,j:integer;
Begin
for i:= 1 to 30 do begin
writeln('Введите номер ученика:');
read(a[1,i]);
writeln('Введите оценку:');
read(a[2,i]);
end;
for i:= 1 to 10 do begin
writeln(i:2,' - ');
for j:= 1 to 30
if a[1,j]=i then
write(a[2,i],' ');
end;
readkey;
End.