#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
using namespace std;
int n,a,b,c,d,jun[101],x;
typedef pair<int,int> P;
P t[101];

bool cmp(const P& a,const P& b){
	return a.first == b.first ? a.second < b.second : a.first > b.first;
}

int main()
{
	cin>>n;
	for(int i=1;i<=n;i++) t[i].second=i;
	for(int i=1;i<=n*(n-1)/2;i++){
		cin>>a>>b>>c>>d;
		if(c>d) t[a].first+=3;
		else if(c<d) t[b].first+=3;
		else {t[a].first++; t[b].first++;}
	}
	sort(t+1,t+n+1,cmp);
	for(int i=1;i<=n;i++){
		if(i>1&&t[i].first==t[i-1].first){
			jun[t[i].second]=x;
		}
		else{
			jun[t[i].second]=i;
			x=i;
		}
	}
	for(int i=1;i<=n;i++){
		cout<<jun[i]<<endl;	
	}
}
#include <bits/stdc++.h>

using namespace std;
#define inf             0x3f3f3f3f
#define INF             2e18
#define eps             1e-9

#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0)
#define fRead           freopen("input.txt","r",stdin)
#define fWrite          freopen("output.txt","w",stdout)

#define LL              long long
#define ull            unsigned long long
#define PI              acos(-1.0)
#define pb              push_back
#define mk              make_pair
#define pii             pair<int,int>
#define pLL             pair<LL,LL>
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define SQR(a)          ((a)*(a))
#define min3(a,b,c)     min(a,min(b,c))
#define max3(a,b,c)     max(a,max(b,c))
#define min4(a,b,c,d)   min(min(a,b),min(c,d))
#define max4(a,b,c,d)   max(max(a,b),max(c,d))
#define max5(a,b,c,d,e) max(max3(a,b,c),max(d,e))
#define min5(a,b,c,d,e) min(min3(a,b,c),min(d,e))
#define vi              vector <int>
#define vL              vector <LL>
#define LB(a,x)         (lower_bound(all(a),x)-a.begin()) //  first element in the range [first,last) which does not compare less than val.
#define UB(a,x)         (upper_bound(all(a),x)-a.begin()) //  first element in the range [first,last) which compares greater than val.
#define prec(n)         fixed << setprecision(n)

#define MEM(a,x)        memset(a,x,sizeof(a))
#define SORT(v)         sort(v.begin(),v.end())
#define REV(v)          reverse(v.begin(),v.end())
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())

#define FOR(i,a,b)      for(int i=a;i<=b;i++)
#define ROF(i,a,b)      for(int i=a;i>=b;i--)
#define REP(i,b)        for(int i=0;i<b;i++)
#define IT(it,x)	    for(it=x.begin();it!=x.end();it++)
vector<pLL>v;
LL n;
double s=0;
void f(vector<pLL>vt)
{
    LL x=v[0].ff,y=v[0].ss;
    for(LL i=0;i<v.size();i++)
    {
        s+=sqrtl((v[i].ff-x)*(v[i].ff-x)+(v[i].ss-y)*(v[i].ss-y));
    }
}
int main()
{
   cin>>n;
   for(LL i=0;i<n;i++)
   {
       LL x,y;
       cin>>x>>y;
       v.pb({x,y});
   }
   sort(all(v));
   do{
        f(v);

   } while(next_permutation(all(v)));
   LL x=1;
   for(LL i=1;i<=n;i++)
    x=x*i;
//    cout<<s<<" "<<x<<endl;
   cout<<prec(10)<<s/x;


}
