#include <bits/stdc++.h>
using namespace std;
int main() {
  long long num, n, m, flag = 1, num1 = 0, num2 = 0, step = 0, c;
  long long a[100];
  cin >> num;
  for (int i = 0; i < num; i++) {
    cin >> a[i];
  }
  while (flag) {
    flag = 0;
    for (int i = 0; i < num - 1; i++) {
      if (a[i] > a[i + 1] && num1 == 0) {
        c = a[i];
        a[i] = a[i + 1];
        a[i + 1] = c;
        cout << i + 1 << " " << i + 2 << endl;
        flag = 1;
      }
    }
  }
  return 0;
}
