#include <bits/stdc++.h>
//#include <bits/extc++.h>
//#define int long long
#define ll long long
#define ull unsigned ll
#define endl "\n"
#define pb push_back
#define ms(v,x) memset(v,x,sizeof(v))
#define ff first
#define ss second
#define td(v) v.begin(),v.end()
#define rep(i,a,n) for (int i=(a);i<(n);i++)
#define per(i,a,n) for (int i=(n-1);i>=a;i--)
#define trav(a, x) for(auto& a : x)
#define re(v) {for(auto &_re : v) cin >> _re;}
#define pr(v) {for(auto _pr : v) cout << _pr << " "; cout << endl;}
#define sz(x) (int)(x).size()
#define all(x) x.begin(), x.end()
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define eb emplace_back
using namespace std;
using vvi = vector<vi>;
using vvl = vector<vl>;
const ll M = 1e9 + 7;
//const ll M = 998244353;
//const ll M = 1e9 + 9;
//const ll M = 1e6;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll binpow(ll a, ll b){
	ll res = (a!=0);
	while(b > 0){
		if(b&1) res = res * a % M;
		a = a * a % M;
		b>>=1;
	}
	return res;
}
void solve(){
	int n;
	cin >> n;
	vector<pll> p(n);
	for(auto &[x, y] : p){
		cin >> x >> y;
	}
	auto dot = [&](pll a, pll b){
		return a.ff*b.ff + a.ss * b.ss;
	};
	auto obt = [&](pll a, pll b, pll c){
		return dot(pll(b.ff - a.ff, b.ss - a.ss), pll(b.ff - c.ff, b.ss - c.ss)) <= 0;
	};
	vi perm(n);
	iota(td(perm), 0);
	//pr(perm);
	for(int i=0;i<=n;i++){
		for(int j=0;j<n-2;j++){
			if(obt(p[perm[j]], p[perm[j+1]], p[perm[j+2]])){
				swap(perm[j], perm[j+1]);
				//assert(!obt(p[perm[j]], p[perm[j+1]], p[perm[j+2]]));
			}
		}
	}
	/*for(int i=0;i<n-2;i++){
		assert(!obt(p[perm[i]], p[perm[i+1]], p[perm[i+2]]));
	}*/
	for(int x : perm) cout << x + 1 << " ";
	cout << endl;
}	
int32_t main(){
  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  //freopen(".in", "r", stdin);
	//freopen(".out", "w", stdout);	
	int t = 1;
	//cin >> t;
	while(t--){
		solve();
	}
}