When WeChat first introduced the function of "counting steps",people began to compete with each other.
The function of "counting steps" involves two parts:
- Count the steps he/she walks today.
- Show the one who walks most today in he/she's friend list, we may call the one a "walking champion".
In each minute, he/she may walk more, so the "walking champion" in he/she's friend list changes dynamically.
In this problem, There are

people in total, numbered from

to

. Friendships are described as a undirected graph with

vertices and

edges.
We divide a day into
time units. In each time unit, only one person walks several steps. One becomes "walking champion" in he/she's friend list, if and only if he/she walks at least

step and the number of his walking steps is
strictly greater than anyone else's in he/she's friend list.
You are given the graph, who walks and how many steps he/she walks in each time unit.
For each person, you are asked to calculate the total number of time units that he/she becomes a "walking champion" in he/she's friend list.
To be more specific, if one became a champion after

time unit, and ended after

time unit (if he/she keeps a championship until the end, then

), then we say he/she becomes a champion for

time unit(s).