import scala.io.StdIn

object Main {
  case class Path(x: Int, y: Int, length: Int)
  case class Edge(to: Int, length: Int)

  def main(args: Array[String]): Unit = {
    while(true) {
      val n :: m :: p :: a :: b :: _res = StdIn.readLine().split(" ").map(_.toInt).toList
      if(n == 0) { return; }

      val ts = StdIn.readLine().split(" ").map(_.toInt).toList
      val paths:List[Path] = (0 until p).toList.map{ _ =>
        val x :: y :: z :: _res = StdIn.readLine().split(" ").map(_.toInt).toList
        Path(x, y, z)
      }

      println(solve(ts, paths, m, a, b).map(x => "%.3f".format(x)).getOrElse("Impossible"))
    }
  }

  def solve(ts: List[Int], paths: List[Path], numCity: Int, start: Int, end: Int): Option[Double] = {
    val cities:List[Int] = (1 to numCity).toList

    val edges = paths.flatMap{ case p@Path(x, y, l) => List(p, Path(y, x, l)) }

    val tickets = ts.toArray
    val ticketIndex = (0 until ts.size).toArray
    val n = ts.size
    val dp = Array.fill(numCity+1, 1 << n)(Double.MaxValue)

    dp(start)(0) = 0

    for {
      ticketUsed <- 0 until (1 << n)
      edge <- edges
      ticketUsing <- 0 until n
    } {
      if((ticketUsed & 1 << ticketUsing) > 0) {
  
        val current = dp(edge.y)(ticketUsed)
        val updating = dp(edge.x)(ticketUsed & ~(1 << ticketUsing)) + edge.length.toDouble / tickets(ticketUsing)
        if(current > updating) {
          dp(edge.y)(ticketUsed) = updating
        }
      }  
    }

    val ret = dp(end).min
    if(ret == Double.MaxValue) { None } else { Some(ret) }
  }
}

