func main() { guard let N = Int(readLine() ?? "") else { return } var graph: [[Int]] = Array(repeating: [], count: N+1) for _ in 1..