#include <bits/stdc++.h>
using namespace std;
int n, a[105], ok;
int main() {
  cin >> n;
  for (int i = (1); i <= int(n); i++) cin >> a[i];
  do {
    ok = 0;
    for (int i = (1); i <= int(n - 1); i++)
      if (a[i] > a[i + 1]) {
        ok = 1;
        cout << i << " " << i + 1 << endl;
        swap(a[i], a[i + 1]);
        break;
      }
  } while (ok == 1);
  return 0;
}
