#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e4 + 5;
const double pi = acosl(-1.0);
struct Vec {
  double x, y;
  Vec() {}
  Vec(double a, double b) : x(a), y(b) {}
  Vec operator+(const Vec &t) const { return Vec(x + t.x, y + t.y); }
  Vec operator-(const Vec &t) const { return Vec(x - t.x, y - t.y); }
} point[4][maxn];
double cro(Vec a, Vec b) { return a.x * b.y - a.y * b.x; }
pair<int, int> query[maxn];
int arr[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &arr[i]);
  double alpth = pi / n;
  Vec now = Vec(0, 0), dir = Vec(10, 0);
  for (int o = 1; o <= 3; o++) {
    for (int i = 1; i <= n; i++) {
      point[o][i] = now;
      now = now + dir;
    }
    dir = Vec(10 * cos(alpth), 10 * sin(alpth));
    alpth += pi / n;
  }
  arr[n] = arr[0];
  for (int i = 0; i < n; i++) {
    Vec base = point[1][arr[i] + 1];
    Vec to = point[3][arr[i + 1] + 1];
    double area1 = cro(point[2][1] - base, to - base);
    double area2 = cro(point[2][2] - base, to - base);
    query[i] = {arr[i] + arr[i + 1], i};
  }
  sort(query, query + n);
  vector<int> ans(n);
  for (int i = 0; i < n; i++) ans[query[i].second] = i;
  for (int i = 0; i < n; i++) {
    printf("%d", ans[i]);
    if (i != n) printf(" ");
  }
  puts("");
  return 0;
}
