let inf = 101010101010101010.0
let rec for_iter a b f = if a >= b then () else (f a; for_iter (a+1) b f)

let rec main () =
  let n, m, p, a, b =
    Scanf.scanf " %d %d %d %d %d" (fun v w x y z -> v, w, x, y-1, z-1) in
  if n = 0 && m = 0 && p = 0 then () else
  let ts = Array.init n (fun _ -> Scanf.scanf " %f" (fun x -> x)) in
  let graph = Array.init m (fun _ -> []) in
  for_iter 0 p (fun _ ->
    Scanf.scanf " %d %d %f" (fun x y z ->
      let x, y = x-1, y-1 in
      graph.(x) <- (y, z) :: graph.(x);
      graph.(y) <- (x, z) :: graph.(y)));

  let dp = Array.init (1 lsl n) (fun _ -> Array.make m inf) in
  dp.(0).(a) <- 0.0;
  for_iter 0 (1 lsl n) (fun b ->
    for_iter 0 m (fun v ->
      for_iter 0 n (fun t -> 
        if b land (1 lsl t) = 0 then () else
        let b' = b lxor (1 lsl t) in
        dp.(b).(v) <- min dp.(b).(v) dp.(b').(v);
        graph.(v) |> List.iter (fun (u, z) ->
          dp.(b).(v) <-
            (dp.(b').(u) +. z /. ts.(t)) |> min dp.(b).(v)))));

  if dp.((1 lsl n) - 1).(b) = inf then
    print_endline "Impossible"
  else
    Printf.printf "%.12f\n" dp.((1 lsl n) - 1).(b);

  main ()

let () = main ()

