import java.util.Scanner
import scala.collection.immutable.Set

object Main extends App {
  val sc = new Scanner(System.in)

  val N = sc.nextInt(); val M = sc.nextInt()
  val sets = new Array[Set[Int]](N+1)  // dist == 1
  for(i <- 0 to N)
    sets(i) = Set()

  
}
