<Problem>
http://ntucoder.net/Problem/Details/1141
Uses Crt;
type arr=array[0..100] of longint;
Var n,i,j,t,x:longint;
a:arr;
Begin
readln(n);
for i:=0 to n-1 do
begin
read(a[i]); // sap xep ngay khi nhap cung duoc
if i>0 then begin
for j:=0 to i do if a[i]<a[j] then break;
writeln(a[i],' ',j);
x:=a[i]; t:=j;
for t:=i downto j+1 do a[t]:=a[t-1]; //Chen
a[j]:=x;
end;
end;
//for j:=1 to n do write(a[j],' ');
readln;
readln;
End.