#include <bits/stdc++.h>
using namespace std;
using u64 = unsigned long long;
using i64 = long long;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  size_t N;
  cin >> N;
  i64 arr[N];
  for (size_t i = 0; i < N; i++) cin >> arr[i];
  for (size_t i = 0; i < N; i++) {
    for (size_t j = 0; j < N - 1; j++) {
      if (arr[j] > arr[j + 1]) {
        swap(arr[j], arr[j + 1]);
        cout << j + 1 << " " << j + 2 << endl;
      }
    }
  }
}
