#include <bits/stdc++.h>
using namespace std;
const int N_ = 105;
int N, A[N_];
int main() {
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) scanf("%d", A + i);
  for (int i = 1; i <= N; i++) {
    for (int j = 1; j + 1 <= N; j++) {
      if (A[j] > A[j + 1]) {
        printf("%d %d\n", j, j + 1);
        swap(A[j], A[j + 1]);
      }
    }
  }
  assert(is_sorted(A + 1, A + N + 1));
  return 0;
}
