#include <bits/stdc++.h>
using namespace std;
std::vector<long long> vec;
int main(void) {
  long long int n, x;
  int arr[110];
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i];
    vec.push_back(arr[i]);
  }
  sort(vec.begin(), vec.end());
  long long k = 0;
  for (long long i = 1; i <= n; i++) {
    long long j = 0;
    for (j = k + 1; j <= n; j++) {
      if (arr[j] == vec[k]) break;
    }
    for (long long x = j; x >= k + 2; x--) {
      cout << x - 1 << " " << x << endl;
      swap(arr[x - 1], arr[x]);
    }
    k++;
  }
  return 0;
}
