Go: package main

import (
	"fmt"
	"bufio"
	"os"
	"strconv"
	"strings"
	"sort"
)

var sc = bufio.NewScanner(os.Stdin)

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func nextLineInt() []int {
	arr := strings.Split(nextLine(), " ")
	var ret []int
	for _, v := range arr {
		x, _ := strconv.Atoi(v)
		ret = append(ret, x)
	}
	return ret
}

type Pair struct {
	First int
	Second int
}

type Pairs []Pair

func (s Pairs) Len() int {
	return len(s)
}

func (s Pairs) Swap(i, j int) {
	s[i], s[j] = s[j], s[i]
}

func (s Pairs) Less(i, j int) bool {
	return s[i].First > s[j].First
}

func main() {
	var n int
	arr := nextLineInt()
	n = arr[0]
	result := []Pair{}
	for i := 0; i < n; i++ {
		result = append(result, Pair{0, i})
	}
	for i := 0; i < n * (n - 1) / 2; i++ {
		arr := nextLineInt()
		A := arr[0]
		B := arr[1]
		C := arr[2]
		D := arr[3]
		if C > D {
			result[A-1].First += 3
		} else if C < D {
			result[B-1].First += 3
		} else {
			result[A-1].First++
			result[B-1].First++
		}
	}
	sort.Sort(Pairs(result))
	var ans [111]int
	point := 1000000000
	top := 0
	for i, r := range result {
		// 前の人よりポイントが低い
		if point > r.First {
			top = i + 1
			point = r.First
		}
		ans[r.Second] = top
	}
	for i := 0; i < n; i++ {
		fmt.Println(ans[i])
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
#define Rep(i,N) for(int i = 0; i < N; i++)
typedef pair<int,int> Pi;
#define F first
#define S second

int main()
{
  int N;
  Pi point[105];
  int out[105];
  cin >> N;

  Rep(i,N)point[i].S = i;
  
  int A, B, C, D;
  Rep(i,N * (N - 1) / 2) {
    cin >> A >> B >> C >> D;
    --A,--B;
    if(C < D) {
      point[B].F += 3;
    } else if(C == D) {
      point[A].F++,point[B].F++;
    } else {
      point[A].F += 3;
    }
  }
  
  sort(point, point + N,greater<Pi>());

  int cnt = 1;
  int p = INT_MAX;
  Rep(i,N) {
    if(p != point[i].F) {
      cnt = i + 1;
      p = point[i].F;
    }
    out[point[i].S] = cnt;
  }
  Rep(i,N)cout << out[i] << endl;
  return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
struct A{int w,d,l,pos;A() {w=d=l=0;}}RB[105];bool operator !=(A a, A b) {return a.w*3+a.d!=b.w*3+b.d;}bool operator <(A a, A b) {return a.w*3+a.d<b.w*3+b.d;}
int main() {
    int N,i,j,l,r,a,b,ans[105];scanf("%d",&N);for (i=0,j=(N*N-N)/2;i<j;i++) {scanf("%d %d %d %d",&l,&r,&a,&b);if (a>b) RB[l].w++,RB[r].l++; else if (a==b) RB[l].d++,RB[r].d++; else RB[l].l++,RB[r].w++;}
    for (i=1;i<=N;i++) RB[i].pos=i;sort(RB+1,RB+N+1);for (l=1,j=1,i=N;i;i--) 
	if (RB[i]!=RB[i-1]) {for (r=0;r<j;r++) ans[RB[i+r].pos]=l;l+=j,j=1;} else j++;for (i=1;i<=N;i++) printf("%d\n",ans[i]);return 0;}

C++: #include<iostream>
#include<string>
 
using namespace std;
 
int main(){
    int n;
	int a[105],b[105],c[105],d[105];
	int t[11000],k[105];
	cin>>n;
	for(int i=0;i<(n*(n-1))/2;i++){
		cin>>a[i]>>b[i]>>c[i]>>d[i];
		t[i]=0;
	}
	for(int i=0;i<(n*(n-1))/2;i++){
		if(c[i]>d[i])
			t[a[i]]+=3;
		if(c[i]<d[i])
			t[b[i]]+=3;
		if(c[i]==d[i]){
			t[a[i]]++;
			t[b[i]]++;
		}
	}
	int j=1;
	int h=0;
	for(int g=n*3;g>=0;g--){
		for(int i=1;i<n+1;i++){
			if(g==t[i]){
				k[i]=j;
				h++;
			}
		}
		j+=h;
		h=0;
    }
	for(int i=1;i<n+1;i++){
		cout<<k[i]<<endl;
	}
    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
	int n, team[101] = { 0 }, a, b, c, d, rank;
	cin >> n;

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

	for (int i = 1; i <= n; i++) {
		rank = 1;
		for (int j = 1; j <= n; j++) {
			team[i] < team[j] ? rank++ : NULL;
		}
		cout << rank << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>

#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;

int main(){
	int n; cin >> n;
	vector<int> teams,res;

	rep(i,n) teams.push_back(0);
	res = teams;
	//cout << endl << teams.size() << "teams" << endl;
	
	rep(i,n*(n-1)/2){
		int a,b,c,d;

		cin >> a >> b;
		cin >> c >> d; 
		
		if(c > d) teams[a%(n+1) - 1] += 3;		
		else if(c < d) teams[b%(n+1) - 1] += 3;
		else{
			teams[a%(n+1) - 1] += 1;
			teams[b%(n+1) - 1] += 1;
		}
	}

	//rep(i,teams.size()) cout << "[" << i + 1 << "] " << teams[i] << "score" <<endl;
	
	rep(i,teams.size()){
		rep(j,teams.size()){
			if(teams[i] < teams[j]) res[i] += 1;
		}
	}	
	
	
	rep(i,n) cout << res[i] + 1 << endl;	

	return 0;
	
}

C++: //============================================================================
// Name        : JOI.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;
int A[101],B[101],C[101],D[101];
int N,M;
int S[101]={};
int main() {
	cin>>N;
	for(int i=0;i<(N*(N-1)/2);i++){
		cin>>A[i]>>B[i]>>C[i]>>D[i];
	}
	for(int i=0;i<(N*(N-1)/2);i++){
		if(C[i]>D[i])S[A[i]]+=3;
		if(C[i]<D[i])S[B[i]]+=3;
		if(C[i]==D[i])S[A[i]]+=1,S[B[i]]+=1;
	}

	int T=0;
	for(int i=1;i<N+1;i++){
		T=1;
		for(int j=1;j<N+1;j++){
			if(S[i]<S[j])T+=1;
		}
		cout<<T<<endl;

	}
	return 0;
}

C++: #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <iterator>
using namespace std;

/*
const int MAX_E=2*(100-1);
const int MAX_V=100;
const long long int INF=100000000;
struct edge { int from,to,cost;};
edge es[MAX_E];
//int d[MAX_V];
int V,E;
void shortest_path(int s,int e,vector<int>& d);
int main(){
	int n,k;
	while(cin >> n >> k&&n!=0&&k!=0){
		int V=n;
		int E=2*(n-1);
		vector<int> land(V);
		int l=0;
		for(int i=0; i<E; ++i){
			es[i].cost=-1;
			es[i].from=-1;
			es[i].to=-1;
		}
		for(int i=0; i<k; ++k){
			int m;
			cin >> m;
			if(m==0){
				int a,b;
				cin >> a >> b;
				shortest_path(a,b,land);
				cout << land[b] << "\n";
			} else if(m==1){
				int c,d,e;
				cin >> c >> d >> e;
				es[l].from=c;
				es[l].to=d;
				es[l].cost=e;
				es[l+1].from=d;
				es[l+1].to=c;
				es[l+1].cost=e;
				l+=2;
			}
		}
	}
	return 0;
}

void shortest_path(int s,int e,vector<int>& d){
	cout << "ok1\n";
	for(int i=0; i<V; ++i) {
		cout << "ok\n";
		d[i]=INF;
	}
	d[s]=0;
	while(true){
		cout << "ok2\n";
		bool update=false;
		for(int i=0; i<E; ++i){
			edge e=es[i];
			if(d[e.from]!=INF&&d[e.to]>d[e.from]+e.cost){
				d[e.to]=d[e.from]+e.cost;
				update=true;
			}
		}
		if(!update) break;
	}
}
*/
/*
const int INF=100000000;
int main(){
	int n;
	while(cin >> n&&n!=0){
		vector<int> color;
		for(int i=0; i<n; ++i){
			int t;
			cin >> t;
			color.push_back(t);
		}
		int maxDel=INF;
		for(int i=0; i<n; ++i){
			for(int j=1; j<=3; ++j){
				if(color[i]==j) continue;
				int up=i-1;
				int down=i+1;
				int sum=0;
				int c=1;
				int col=j;
				while(1){
					int nCal=-1;
					while(1){
						if(up<0) break;
						if(color[up]!=col){
							nCal=color[up];
							break;
						}
						up--;
						c++;
					}
					while(1){
						if(down>=n) break;
						if(color[down]!=col){
							if(nCal==-1) nCal=color[down];
							break;
						}
						++down;
						++c;
					}
					if(c>=4){
						sum+=c;
					} else{
						break;
					}
					c=0;
					if(nCal==-1){
						break;
					}else{
						col=nCal;
					}
				}
				maxDel=min(maxDel,n-sum);
			}
		}
		cout << maxDel << "\n";
	}
	return 0;
}
*/

int main(){
	int n;
	cin >> n;
	vector<int> team(n+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[a]+=3;
		if(d>c) team[b]+=3;
		if(c==d){
			team[a]++;
			team[b]++;
		}
	}
	for(int i=1; i<n+1; ++i){
		int cnt=0;
		for(int j=1; j<n+1; ++j){
			if(i!=j){
				if(team[i]<team[j])++cnt;
			}else{
				if(team[i]<=team[j])++cnt;
			}
		}
		cout << cnt << "\n";
	}
	return 0;
}