object Main extends App {
    val in = io.Source.stdin.getLines.map(_.split(" ").map(_.toInt))
    val qs = Array.fill(in.next.head)(2147483647)
    in.foreach(_ match {
        case Array(0, i, x) => qs.update(i, x)
        case Array(1, s, t) => println(qs.slice(s, t+1).min)
    })
}