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