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