#include <bits/stdc++.h>
using namespace std;
inline int add(int a, int b, int m = 1000000007) {
  a += b;
  if (a >= m) a -= m;
  return a;
}
inline int mul(int a, int b, int m = 1000000007) {
  return (int)(((long long)a * (long long)b) % m);
}
void bubblesort(int a[], int n) {
  int i, j, t;
  for (i = 0; i < n - 1; i++) {
    for (j = 0; j < n - 1 - i; j++) {
      if (a[j] > a[j + 1]) {
        t = a[j];
        a[j] = a[j + 1];
        a[j + 1] = t;
        cout << j + 1 << ' ' << j + 2 << endl;
      }
    }
  }
}
int main() {
  int n;
  int a[110];
  cin >> n;
  for (int i = (0); i <= (n - 1); ++i) cin >> a[i];
  bubblesort(a, n);
}
