#include <cstdio>
#include <algorithm>
#define MAXN            5000

struct point {
  int x, y, val;
} pts[MAXN];

struct segment {
  point start, end;
  
  // I couldn't remember how to compute signed triangle area... *sob* I'm a f+++ing joke...
  bool intersects(const segment& other) const
  {
    double k1 = double(end.y - start.y) / double(end.x - start.x),
           k2 = double(other.end.y - other.start.y) / double(other.end.x - other.start.x);
    
    double n1 = k1 * (start.x + end.x) - (start.y - end.y),
           n2 = k2 * (other.start.x + other.end.x) - (other.start.y - other.end.y);
    
    double x_intersect = (n2 - n1) / (k1 - k2);
    if (x_intersect > start.x && x_intersect < end.x && x_intersect > other.start.x && x_intersect < other.end.x)
      return true;
    else return false;
  }
} segments[MAXN];

struct comp {
  bool operator()(const point& one, const point& two) const
  {
    return one.y < two.y;
  }
};

int N, Nsegments;

bool draw_segment(const segment& sgt)
{
  for (int i = 0; i < Nsegments; ++i) {
    if (sgt.intersects(segments[i])) {
      return false;
    }
  }
  
  segments[Nsegments++] = sgt;
}


int main()
{
  FILE * in = fopen("flojd.in", "r"),
       * out = fopen("flojd.out", "w");
       
  fscanf(in, "%d", &N);
  for (int i = 0; i < N; ++i) {
    fscanf(in, "%d %d", &pts[i].x, &pts[i].y);
    pts[i].val = i + 1;
  }
  std::sort(pts, pts + N, comp());
  
  int Nm3 = (N%3), Nd3 = N - Nm3;
  for (int i = 0; i < Nd3; i += 3) {
    segment segtry1, segtry2;
    segtry1.start = pts[i];
    segtry1.end = pts[i + 2];
    segtry2.start = pts[i + 2];
    segtry2.end = pts[i + 1];
    if (!draw_segment(segtry1) || !draw_segment(segtry2)) {
      fprintf(out, "-1\n");
      return 0;
    }
  }
  
  for (int i = 0; i < Nsegments; ++i) {
    fprintf(out, "%d\n", segments[i].start.val);  
  }
  fprintf(out, "%d\n", segments[Nsegments - 1].end.val);
  
  if (Nm3 == 1) {
    fprintf(out, "%d\n", pts[N - 1].val);
  } else if (Nm3 == 2) {
    fprintf(out, "%d\n%d\n", pts[N - 1].val, pts[N - 2].val);
  }
  
  fclose(in), fclose(out);
  return 0;
}
