#include <bits/stdc++.h>
using namespace std;
int a[200];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < n; i++) {
    int idx = i, mn = a[i];
    for (int j = i + 1; j < n; j++) {
      if (a[j] < mn) {
        mn = a[j];
        idx = j;
      }
    }
    for (int j = idx; j > i; j--) {
      int e = a[j];
      a[j] = a[j - 1];
      a[j - 1] = e;
      printf("%d %d\n", j, j + 1);
    }
  }
  return 0;
}
