#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <map>
using namespace std;
int main(void){
  int n;cin>>n;
  vector<int> v(n,0);
  for(int i=0,a,b,c,d;i<n*(n-1)/2;++i){
    cin>>a>>b>>c>>d;
    if(c!=d)v[(c>d)?a-1:b-1]+=3;
    else{++v[a-1];++v[b-1];}
  }
  map<int,int,greater<int> > rank;
  for(int i=0;i<n;++i)++rank[v[i]];
  int r=1;
  for(map<int,int>::iterator it=rank.begin();it!=rank.end();++it){
  	int t=it->second;
  	it->second=r;
  	r+=t;
  }
  for(int i=0;i<n;++i) cout<<rank[v[i]]<<endl;
  return 0;
}