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