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