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