#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e2 + 1;
int t[MAX], g[MAX], n;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> t[i];
    g[i] = t[i];
  }
  sort(g, g + n);
  int cur = 0;
  for (int i = 0; i < n; i++) {
    if (i != 0 && g[i] == g[i - 1])
      ++cur;
    else
      cur = 0;
    int x = 0, j = 0;
    while (j < n && x <= cur) x += (t[j++] == g[i]);
    --j;
    for (int k = j - 1; k >= i; k--) {
      cout << k + 1 << " " << k + 1 + 1 << '\n';
      swap(t[k], t[k + 1]);
    }
  }
  return 0;
}
