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<cstdio>
#include <iostream>
#include <string>
#include<algorithm>
#include <map>
#pragma warning(disable:4786)  // VisualC++6.0の警告対策



using namespace std;

#define ll long long
#define SINT(n) scanf("%d",&n);
#define SINT2(n,m) scanf("%d %d",&n,&m);
#define SINT3(n,m,o) scanf("%d %d %d",&n,&m,&o);
#define SINT4(n,m,o,p) scanf("%d %d %d %d",&n,&m,&o,&p);
#define SLL(n) scanf("%lld",&n);
#define SST(s) scanf("%s",&s);

#define PINT(n) printf("%d",(int)(n));
#define PINT2(n,m) printf("%d %d",(int)(n),(int)(m));
#define PLL(n) printf("%lld",(long long)(n));
#define PST(s) printf("%s",(s));
#define PCH(s) printf("%c",(s));

#define PINTN(n) printf("%d\n",(int)(n));
#define PINT2N(n,m) printf("%d %d\n",(int)(n),(int)(m));
#define PLLN(n) printf("%lld\n",(long long)(n));
#define PSTN(s) printf("%s\n",(s));
#define PCHN(s) printf("%c\n",(s));

#define PSP() printf(" ");
#define PN() printf("\n");


#define dlp(i) while(i-->0)
#define ulp(i) for(ll _hoge_counter_hoge_=i,i=0;i<_hoge_counter_hoge_;i++)

#define lp(i) for(ll _hoge_counter_hoge_=i;_hoge_counter_hoge_--;)
#define lpp(i,to) for(i=0;i<to;i++)
#define lpft(i,from,to) for(i=from;i<to;i++)

#define lengthof(x) (sizeof(x) / sizeof(*(x)))

map<ll, map<ll, short> > memo[50][50][4];

char Map[60][60];

int main(){

	int N;
	int i,j,k;
	int a,b,c,d;
	int t[100];


	std::fill((int*) t, (int*) (t + lengthof(t)), 0);
	//memset(t,sizeof(t),0);

	SINT(N);

	
	lpp(i,N*(N-1)/2){
		SINT4(a,b,c,d);
		if(c>d){
			t[a-1]+=3;
		}
		if(c<d){
			t[b-1]+=3;
		}
		if(c==d){
			t[a-1]++;
			t[b-1]++;
		}
	}

	lpp(i,N){
		a=1;
		lpp(j,N){
			if(t[j]>t[i]) a++;
		}
		PINTN(a);
	}
	
	return 0;
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define forever for (;;)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
template<typename A> using V = std::vector<A>;
template<typename A> using F = std::function<A>;
template<typename A, typename B> using P = std::pair<A, B>;
using pii = P<int, int>;
using vi = V<int>;
using vd = V<double>;
using vs = V<std::string>;
using vpii = V<pii>;
using vvi = V<vi>;
using vvpii = V<vpii>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = 3.14159265358979;
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int n) { return n & 1; }
constexpr bool even(const int n) { return ~n & 1; }
template<typename T> std::istream &operator>>(std::istream &is, std::vector<T> &v) { for (T &x : v) is >> x; return is; }
template<typename A, typename B> std::istream &operator>>(std::istream &is, std::pair<A, B> &p) { is >> p.first; is >> p.second; return is; }
using namespace std;
// clang-format on

main {
  int n;
  cin >> n;
  vi v(n);
  rep(i, n * (n - 1) / 2) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    --a, --b;
    if (c == d) {
      v[a]++;
      v[b]++;
      continue;
    }
    v[c > d ? a : b] += 3;
  }
  rep(i, n) {
    int r = 1;
    rep(j, n) r += v[i] < v[j];
    cout << r << endl;
  }
}

C++: #include <iostream>
#include<string>
#include<algorithm>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int a[n]={};
    for(int i=0;i<n*(n-1)/2;i++){
        int t1,t2,s1,s2;
        cin >> t1 >> t2 >> s1 >> s2;
        if(s1>s2) a[t1-1]+=3;
        else if(s1<s2) a[t2-1]+=3;
        else {
            a[t1-1]++;
            a[t2-1]++;
        }
    }
    int b[n];
    for(int i=0;i<n;i++) b[i]=a[i];
    sort(a,a+n);
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            if(b[i]==a[j]){
                b[i]=j+1;
                break;
            }
        }
    }
    for(int i=0;i<n;i++) cout << b[i] << endl;
    return 0;
}

C++: #include <iostream>
#include <map>
#include <vector>
#include <algorithm>

using namespace std;

struct comparator {
  int operator() (const pair<int, int>& l, const pair<int, int>& r) {
    return l.second < r.second;
  }
};

int main(int argc, char *argv[]) {
  // second = team's number                                                                                                                                               
  vector<pair<int, int> >team;
  int n, a, b, c, d, game;
  cin >> n;
  for (int i = 0; i < n; i++)
    team.push_back(pair<int, int>(0, i));
  game = n * (n-1) / 2;

  for (int i = 0; i < game; i++) {
    cin >> a >> b >> c >> d;
    if (c > d) {
      team[a-1].first += 3;
    } else if (c < d) {
      team[b-1].first += 3;
    } else {
      team[a-1].first++;
      team[b-1].first++;
    }
  }

  sort(team.rbegin(), team.rend());
  int points = -1, rank = 1;
  for (int i = 0; i < n; i++)
    if (team[i].first == points) {
      team[i].first = rank;
    } else {
      points = team[i].first;
      team[i].first = i+1;
      rank = i+1;
    }
  struct comparator comp;
  sort(team.begin(), team.end(), comp);

  for (int i = 0; i < n; i++)
    cout << team[i].first << endl;
  return 0;
}

C++: #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif

//#define int long long
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9) + 7;
template<class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if (a > b) { a = b; return true; } return false; }


signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N; cin >> N;
	vector<int> v(N);
	rep(i, 0, N*(N - 1) / 2) {
		int a, b, c, d; cin >> a >> b >> c >> d;
		a--, b--;
		if (c > d)v[a] += 3;
		else if (c < d)v[b] += 3;
		else if (c == d)v[a]++, v[b]++;
	}
	dump(v);
	vector<int> v2 = v;
	sort(all(v2));
	dump(v2);
	rep(i, 0, N) {
		cout << N - (upper_bound(v2.begin(), v2.end(), v[i]) - v2.begin()) + 1 << endl;
	}
	return 0;
}