- The first line will contain two space-separated integers, N and K, where N is the number of nodes in the graph, and K is the input parameter described in the rules
- The nodes of the graph will be numbered from 0 to N-1
- Each of the subsequent lines will represent an edge of the graph and will contain two space-separated integers (according to the numbering defined above)