#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a[200] = {};
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  bool flag = 1;
  while (flag) {
    flag = 0;
    for (int j = 0; j < n - 1; ++j) {
      if (a[j + 1] < a[j]) {
        swap(a[j + 1], a[j]);
        cout << j + 1 << ' ' << j + 2 << endl;
        flag = 1;
      }
    }
  }
  return 0;
}
