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