#include <bits/stdc++.h>
using namespace std;
int n;
int a[250];
bool judge() {
  for (int i = 1; i < n; i++) {
    if (a[i] > a[i + 1]) return false;
  }
  return true;
}
int main() {
  while (cin >> n) {
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    while (!judge()) {
      for (int i = 1; i < n; i++) {
        if (a[i] > a[i + 1]) {
          int t;
          t = a[i];
          a[i] = a[i + 1];
          a[i + 1] = t;
          cout << i << " " << i + 1 << endl;
        }
      }
    }
  }
  return 0;
}
