n = gets.to_i
xs = [0] * n
(n*(n-1)/2).times do
  a, b, c, d = gets.split.map(&:to_i)
  case c <=> d
  when 1
    xs[a-1] += 3
  when 0
    xs[a-1] += 1
    xs[b-1] += 1
  when -1
    xs[b-1] += 3
  end
end

hash = {}
xs.each_with_index do |x, i|
  hash[x] ||= []
  hash[x] << i
end

ys = [0] * n
rank = 1
hash.keys.sort.reverse.each do |x|
  hash[x].each do |i|
    ys[i] = rank
  end
  rank += hash[x].size
end

n.times do |i|
  puts ys[i]
end
