#include<iostream>
using namespace std;
int main()
{

  int n;
  int box;
  int sum[105] = {};
  int a[5000],b[5000];
  int c[5000],d[5000];
  int max,temp;
  int rank[105];
  int count = 0;

  cin >> n;
  box = (n*(n-1))/2;

  for( int i=1;i<=box;i++ ) cin >> a[i] >> b[i] >> c[i] >> d[i];
 
  for( int i=1;i<=box;i++ ){
    if( c[i] == d[i] ){
      sum[a[i]]++;
      sum[b[i]]++;
    }
    else if( c[i] > d[i] ) sum[a[i]] += 3;
    else if( c[i] < d[i] ) sum[b[i]] += 3;
  }

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

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

  return 0;

}

