#include<stdio.h>
#include<iostream>
using namespace std;
int main(void){
	int n,a[4],t[100],i,c,j;
		cin>>n;
	for(i=0;i!=n;i++){
		t[i]=0;
	}
		for(i=0;i!=n*(n-1)/2;i++){
			for(j=0;j!=4;j++)
				cin>>a[j];
			if(a[2]<a[3])
				t[a[1]-1]+=3;
			else if(a[2]>a[3])
				t[a[0]-1]+=3;
			else{
				t[a[0]-1]++;
				t[a[1]-1]++;
			}
		}
	for(i=0;i!=n;i++){
		c=1;
		for(j=0;j!=n;j++){
			if(t[i]<t[j])
				c++;
		}
		cout<<c<<endl;
	}
}
#include <bits/stdc++.h>
using namespace std;

int main() {
    int N;
    cin >> N;
    vector<pair<int,int> > team(N);
    for (int i = 0; i < N; i++) {
        team[i].second = i + 1;
    }

    for (int i = 0; i < N * (N - 1) / 2; i++) {
        int a, b, c, d;
        cin >> a >> b >> c >> d;
        if (c < d) team[b-1].first+=3;
        if (c > d) team[a-1].first+=3;
        if (c == d) {
            team[a-1].first++;
            team[b-1].first++;
        }
    }

    sort(team.begin(), team.end());
    reverse(team.begin(), team.end());

    vector<int> rank(N);
    rank[team[0].second-1] = 1;
    for (int i = 1, count = 1, r = 1; i < N; i++) {
        if (team[i].first == team[i-1].first) {
            rank[team[i].second-1] = r;
            count++;
        }
        else {
            r += count;
            rank[team[i].second-1] = r;
            count = 1;
        }
    }

    for (auto i : rank) cout << i << endl;

    return 0;
}