#include<iostream>

using namespace std;

int main(){
  int n;
  cin >> n;

  int score[n];
  for(int i = 0; i < n; i++) score[i] = 0;

  for(int i = 0; i < (n * (n-1)/2); i++){
    int t1, t2, s1, s2;
    cin >> t1 >> t2 >> s1 >> s2;
    if(s1 > s2) score[t1 - 1] += 3;
    else if(s1 < s2) score[t2 - 1] += 3;
    else if(s1 == s2){score[t1 - 1]++; score[t2 - 1]++;}
  }

  int rank[n];
  for(int i = 0; i < n; i++) rank[i] = 1;

  for(int i = 0; i < n; i++){
    for(int j = 0; j < n; j++){
      if(score[i] < score[j]) rank[i]++;
    }
  }


  for(int i = 0; i < n; i++) cout << rank[i] << endl;
}

