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 graph:Map[Int, List[Edge]] = cities.map { (i:Int) =>
      val edges = (paths.filter(_.x == i).map{ case Path(_, y, l) => Edge(y, l) }) ++ (paths.filter(_.y == i).map{ case Path(x, _, l) => Edge(x, l) })

      (i, edges)
    }.toMap

    def rec(now: Int, visited: Set[Int], path: List[Edge], resid: Int): List[List[Edge]] = {
      if(now == end) return List(path)
      if(resid == 0) return Nil

      val currentVisited = visited + now

      val nexts = graph(now).filter{ case Edge(to, _) => !visited(to) }
      nexts.flatMap{ next =>
        rec(next.to, currentVisited, next +: path, resid - 1)
      }
    }

    val validEdges = rec(start, Set(start), Nil, ts.size)

    if(validEdges.isEmpty) { None } else {
      val sortedTs = ts.sorted.reverse
      val ret = validEdges.map{ ve =>
        val time = ve.map(_.length).sorted.reverse.zip(sortedTs).map{ case (l, t) => l.toDouble / t }.sum
        time
      }.min
      Some(ret)
    }
  }
}

