#include <bits/stdc++.h>
using namespace std;
int a, b[109];
int main() {
  cin >> a;
  for (int i = 1; i <= a; i++) cin >> b[i];
  for (int i = 1; i <= a; i++) {
    if (b[i] > b[i + 1] and i + 1 <= a) {
      swap(b[i], b[i + 1]);
      cout << i << ' ' << i + 1 << endl;
      i = 0;
    }
  }
  return 0;
}
