#include <bits/stdc++.h>
using namespace std;
bool vis[101];
int main() {
  int n;
  long long high[101];
  long long a;
  while (cin >> n) {
    for (int i = 1; i <= n; i++) {
      cin >> high[i];
    }
    for (int k = 0; k < n; k++) {
      for (int j = 1; j < n; j++) {
        if (high[j] > high[j + 1]) {
          cout << j << " " << j + 1 << endl;
          a = high[j];
          high[j] = high[j + 1];
          high[j + 1] = a;
        }
      }
    }
  }
}
