#include <iostream>
#include<algorithm>
using namespace std;
int g[100],jyunni[100];
int n;
void katimake(int a,int b,int c,int d){
	if(c>d){g[a-1]+=3;}
	else if(d>c){g[b-1]+=3;}
	else{
		g[a-1]++;
		g[b-1]++;
	}
	}
int main() {
	cin>>n;
	for(int i = 0;i<100;i++){
		g[i]=0;
	}
	int p,q,r,s;
	while(cin>>p>>q>>r>>s){katimake(p,q,r,s);}
	int jyu = 1;
	int saidai=0;
	for(int i= 0;i<n;i++){saidai=max(saidai,g[i]);}
	for(int p=saidai;saidai>=0;saidai--){
		int y=0;
		for(int i =0;i<n;i++){
		if(g[i]==saidai){
			jyunni[i]=jyu;
			y++;
			}
		}
		jyu+=y;
	}
	for(int i = 0;i<n;i++){
		cout<<jyunni[i]<<endl;
	}
	return 0;
}
#include<iostream>
#include<algorithm>
#include<vector>
#include<functional>
using namespace std;

int main()
{
	int n, team1, team2, score1, score2, point[101] = {0};
	vector<int> rank;
	cin >> n;
	for(int i = 0; i < n * (n - 1) / 2; i++){
		cin >> team1 >> team2 >> score1 >> score2;
		if(score1 > score2)
			point[team1] += 3;
		else if(score1 < score2)
			point[team2] += 3;
		else{
			point[team1]++;
			point[team2]++;
		}
	}

	for(int i = 0; i < n; i++)
		rank.push_back(point[i + 1]);

	stable_sort(rank.begin(), rank.end(), greater<int>());

	for(int i = 1; i <= n; i++){
		for(int j = 0; j < n; j++){
			if(point[i] == rank[j]){
				cout << j + 1 << endl;
				break;
			}
		}
	}

	return 0;
}