#include <iostream>
using namespace std;

int main(){
  int n,a,b,c,d,t=-1,nr=1,count=0;
  int pt[100]={};
  int rank[100]={};

  cin >> n;

  for (int i=0;i<n*(n-1)/2;i++){
    cin >> a >> b >> c >> d;
    if (c > d) pt[a-1]+=3;
    else if (c < d) pt[b-1]+=3;
    else {
      pt[a-1]++;
      pt[b-1]++;
    }
  }
  while (nr<=n){
    for (int i=0;i<n;i++){
      if (t<pt[i])t=pt[i];
    }
    for (int i=0;i<n;i++){
      if (t==pt[i]){
	rank[i]=nr;
	pt[i]=-1;
	count ++;
      }
    }
    nr+=count;
    count =0;
    t=-1;
  }

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

  return 0;
}