def calc(arr, xyz, t)
    sum = 0
    ret = []
    (0..arr.count-2).each do |index|
        ret << xyz[arr[index]][arr[index+1]]
    end
    ret.sort.reverse.each_with_index {|v, index| sum = sum + v/t[index] }
    return sum
end
def find(n, xyz, a, b, t)
    rets = {}
    tmp = [[a]]
    while !tmp.empty?
        arr = tmp.pop
        keys = xyz[arr.last].keys
        keys.each do |key|
            if key == b
                #sum = calc(arr << b, xyz, t)
                #rets[b] = rets[b] == nil ? sum : [rets[b], sum].min
            elsif !arr.include?(key) && arr.count <= n-1
                #tmp_arr = arr.dup << key
                #sum = calc(tmp_arr, xyz, t)
                #if rets[key] == nil || rets[key] > sum
                #    rets[key] = sum
                #    tmp << tmp_arr
                #end
            end
        end
    end
    return rets[b] || 0
end

while true ########
n, m, r, a, b = gets.split(' ').map(&:to_i)
break if n + m + r + a + b == 0

t = gets.split(' ').map(&:to_i).sort.reverse
xyz = {}
(1..m).each{ |e| xyz[e] = {} }
r.times do
    x, y, z = gets.split(' ').map(&:to_i)
    xyz[x][y] = z.to_f
    xyz[y][x] = z.to_f
end

answer = find(n, xyz, a, b, t)

if answer == 0
    puts 'Impossible'
else
    puts sprintf("%.3f", answer)
end

end ###############
