The input consists of data sets that describe networks of people. For each data set, the first line has two integers: P (2 ≤ P ≤ 50), the number of people in the network, and R (R ≥ 1), the number of network relationships. Following that first line are R relationships. Each relationship consists of two strings that are names of people in the network who are related. Names are unique and contain no blank spaces. Because a person may be related to more than one other person, a name may appear multiple times in a data set.
The final test case is followed by a line containing two zeroes.
For each network, display the network number followed by the maximum degree of separation. If the network is disconnected, display 'DISCONNECTED'. Display a blank line after the output for each network. Use the format illustrated in the sample output.