#include <bits/stdc++.h>
using namespace std;
const int NMAX = 100 + 5;
int n, a[NMAX], b[NMAX];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  memcpy(b, a, sizeof(a));
  sort(b + 1, b + n + 1);
  for (int i = 1; i <= n; ++i)
    for (int j = i; j <= n; ++j) {
      if (b[i] == a[j]) {
        for (int k = j - 1; k >= i; --k) {
          swap(a[k], a[k + 1]);
          printf("%d %d\n", k, k + 1);
        }
        break;
      }
    }
  return 0;
}
