#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
int a[105];
int main() {
  int n;
  scanf("%d", &n);
  for (int(i) = 0; (i) < (n); (i)++) scanf("%d", &a[i]);
  while (true) {
    bool flag = false;
    for (int(i) = (1); (i) <= (n - 1); (i)++) {
      if (a[i] < a[i - 1])
        swap(a[i], a[i - 1]), v.push_back({i - 1, i}), flag = true;
    }
    if (!flag) break;
  }
  for (int(i) = 0; (i) < ((int)(v.size())); (i)++) {
    cout << v[i].first + 1 << " " << v[i].second + 1 << "\n";
  }
  return 0;
}
