#include <iostream>
#include <cstdio>
#include <algorithm>
#include <queue>

using namespace std;

int main(){
	
	int team[200], t_rank[200];
	
	int N;
	
	cin >> N;
	
	int a, b, c, d;
	
	for(int i = 0; i <= N; i++){
		team[i] = 0;
	}
	
	for(int i = 0; i < N * (N - 1) / 2; i++){
		cin >> a >> b >> c >> d;
		if(c > d){
			team[a] += 3;
		}else if(c < d){
			team[b] += 3;
		}else if(c == d){
			team[a]++;
			team[b]++;
		}
	}
	
	int rank = 1;
	
	int count;
	
	for(int i = N * 3; i >= 0; i--){
		count = 0;
		for(int j = 1; j <= N; j++){
			if(team[j] == i){
				count++;
				t_rank[j] = rank;
			}
		}
		rank += count;
	}
	
	for(int i = 1; i <= N; i++){
		cout << t_rank[i] << endl;
	}
	
	return 0;
}