n = gets.chomp.to_i

point = Array.new(n).map{|x| x=0}

for i in 0..n*(n-1)/2-1
  a,b,c,d = gets.chomp.split.map(&:to_i)
  if c==d
    point[a-1] += 1
    point[b-1] += 1
  elsif c>d
    point[a-1] += 3
  else
    point[b-1] += 3
  end
end

p_sort = point.sort.reverse

point.map{|x|
  puts p_sort.index{|y| x==y}+1
}
