n = gets.to_i
point = [0] * n
(n*(n-1)/2).times{
    a, b, c, d = gets.split.map &:to_i
    if c > d
        point[a-1] += 3
    elsif c < d
        point[b-1] += 3
    else
        point[a-1] += 1
        point[b-1] += 1
    end
}
puts (1..n).map{|i| point.sort.reverse.index(point[i-1]) + 1}