#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int h[100] = {0};
    for (int i = 0; i < n; ++i) {
      cin >> h[i];
    }
    for (int i = 0; i < n - 1; ++i) {
      for (int j = 0; j < n - 1 - i; ++j) {
        if (h[j] > h[j + 1]) {
          cout << j + 1 << " " << j + 2 << endl;
          int t = h[j + 1];
          h[j + 1] = h[j];
          h[j] = t;
        }
      }
    }
  }
  return 0;
}
