#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int point[101];
vector<int> pointed;
int main() {
	int N;
	cin >> N;
	for(int i=0;i<N*(N-1)/2;i++){
		int a,b,c,d;
		cin >> a >> b >> c >> d;
		if(c==d){
		point[a]++;
		point[b]++;
		}
		if(c>d){
			point[a]+=3;
		}
		if(c<d){
			point[b]+=3;
		}
	}
	for(int i=0;i<N;i++){
		pointed.push_back(point[i+1]);
///		cout << point[N] << endl;
	}
	sort(pointed.begin(),pointed.end());
	
	for(int i=1;i<=N;i++){
		for(int j=N-1;j>=0;j--){
			if(pointed[j]==point[i]){
				cout << N-j << endl;
			break;
			}
		}
	}
	
	// your code goes here
	return 0;
}