#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
int main(void) {
  int N;
  int T1, T2, P1, P2;
  int cnt[100]={0};
  int R = 0;
  int j = 0;
  while(cin >> N) {
    memset(cnt, 0, sizeof(cnt));
    for(int i = 0 ; i < N*(N-1)/2 ; i++) {
      cin >> T1 >> T2 >> P1 >> P2;
      if(P1 > P2) cnt[T1] += 3; 
      else if(P1 < P2) cnt[T2] += 3;
      else if(P1 == P2) { cnt[T1]++; cnt[T2]++; }	
    }
    /*for(int i = 1 ; i <= N ; i++) {
      cout << cnt[i] << ' ';
    }
    cout << endl;*/
    for(int i = 1 ; i <= N ; i++) {
      for(int j = 1 ; j <= N ; j++) {
	  if(cnt[i] < cnt[j]) R++;
      }
      cout << R+1 << endl;
      R = 0;
    }
    //cout << endl;
  }
  return 0;
}