func_code_string: #include<bits/stdc++.h>   #define For(i,x,y) for (register int i=(x);i<=(y);i++)   #define FOR(i,x,y) for (register int i=(x);i<(y);i++)   #define Dow(i,x,y) for (register int i=(x);i>=(y);i--)   #define Debug(v) for (auto i:v) cout<<i<<   ;puts(  )   #define mp make_pair   #define fi first   #define se second   #define pb push_back   #define ep emplace_back   #define siz(x) ((int)(x).size())   #define all(x) (x).begin(),(x).end()   #define fil(a,b) memset((a),(b),sizeof(a))   using namespace std;   typedef long long ll;   typedef unsigned long long ull;   typedef pair<int,int> pa;   typedef pair<ll,ll> PA;   typedef vector<int> poly;   inline ll read(){    ll x=0,f=1;char c=getchar();    while ((c< 0 ||c> 9 )&&(c!= - )) c=getchar();    if (c== - ) f=-1,c=getchar();    while (c>= 0 &&c<= 9 ) x=x*10+c- 0 ,c=getchar();    return x*f;   }      const int N = 5010;   int n,p[N];   pa a[N];      inline pa operator - (pa a,pa b){    return mp(a.fi-b.fi,a.se-b.se);   }   inline bool check(pa a,pa b,pa c){    pa A=a-b,B=c-b;    return (1ll*A.fi*B.fi+1ll*A.se*B.se)>0;   }      int main(){    n=read();    For(i,1,n) a[i].fi=read(),a[i].se=read(),p[i]=i;    For(i,3,n){     Dow(j,i,3) if (!check(a[p[j-2]],a[p[j-1]],a[p[j]])){      swap(p[j],p[j-1]);     }    }    For(i,1,n) printf( %d  ,p[i]);   }