#include <iostream>

using namespace std;

int w[100 + 3] ={0};
int n;
int r[100 + 3] ={0}; 

int main(){
    cin >> n;
    for(int i = 0;i < n*(n-1)/2;i++){
        int a, b, pa, pb;
        cin >> a >> b >> pa >> pb;
        if(pa > pb) {
            w[a] += 3;
        }
        else if(pa ==pb){
            w[a] += 1;
            w[b] += 1;
        }
        else{
            w[b] += 3;
        }
    }
    for(int i = 1;i <= n;i++){
        for(int j = 1; j <= n;j++){
            if(w[i] < w[j]){
                r[i] += 1;
            }
        }
    }    
    for(int i = 1;i <= n;i++){
        cout << r[i] + 1 << endl;
    }
    return 0;
}