num = gets.chomp.to_i
n = num*(num-1)/2
cnt = []
for i in 0..(num-1)
 cnt[i] = 0
end

n.times do |i|
  data = gets.split.map(&:to_i)
  a = data[0]-1
  b = data[1]-1
  if data[2] == data[3]
    cnt[a] += 1
    cnt[b] += 1
  elsif data[2] < data[3]
    cnt[b] += 3
  else
    cnt[a] += 3
  end
end

rank = []
for i in 0..num-1
  rank[i] = 0
end

for i in 0..num-1
  for j in 0..num-1
    if cnt[i] < cnt[j]
       rank[i] += 1
    end
  end
  rank[i] += 1
end
puts rank

