import scala.collection.mutable
import scala.io.StdIn._
object Main extends App {
  val Array(n, s, t) = readLine.trim.split(' ').map(_.toInt)
  val min = ask(s, t)
  val suspects = (1 to n).filterNot(i ⇒ i == s || i == t).map{mid ⇒
    (mid, ask(s, mid), ask(mid, t))
  }.filter{case (i, sm, mt) ⇒ sm + mt == min}.sortBy(_._3).map{case (i, _, mt) ⇒ (i, mt)}
  if (suspects.nonEmpty) {
    val stack = mutable.Stack(suspects.head)
    for (p@(mid, fromStart) ← suspects.tail) {
      val mm = ask(stack.head._1, mid)
      if (fromStart == mm + stack.head._2) {
        stack.push(p)
      }
    }
    println(s"! $s ${stack.map(_._1).mkString(" ")} $t")
  }else {
    println(s"! $s $t")
  }
  def ask(a: Int, b: Int): Int = {
    println(s"? $a $b")
    readInt()
  }
  implicit class Scope[T](val value: T) extends AnyVal {
    def let[A](@inline func: T ⇒ A): A = func(value)
    def also(@inline func: T ⇒ Unit): T = {func(value);value}
    def minOption[A](implicit ev: T ⇒ Iterable[A], ord: Ordering[A]): Option[A] = if (value.isEmpty) None else Some(value.min)
  }
}
