#include <bits/stdc++.h>
int n, a[100];
int main() {
  std::cin >> n;
  for (int i = 0; i < n; i++) {
    std::cin >> a[i];
  }
  bool b = true;
  while (b) {
    b = false;
    for (int i = 0; i < n - 1; i++) {
      if (a[i + 1] < a[i]) {
        std::swap(a[i], a[i + 1]);
        std::cout << i + 1 << " " << i + 2 << std::endl;
        b = true;
      }
    }
  }
}
