object Main {
  val sc = new java.util.Scanner(System.in)

  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val N = sc.nextInt
    val Q = sc.nextInt
    val S = sc.next
    val list = Array.fill(Q, 2)(sc.nextInt)

    var dp = Array.fill(N, N)(0)


  }
}