N=int(input()) A=list(map(int,input().split())) for i in range(N): for j in range(i+1,N): if A[i]>A[j]: A[i],A[j]=A[j],A[i] print(i,j) assert A==sorted(A)