from sys import stdout N = int(raw_input()) A = map(int,raw_input().split()) M = 0 op = [] for i in xrange(N): for j in xrange(i+1,N): if A[j]