
def roots(xyz, a, b, rest)
    ret = []
    tmp = [[a]]
    while !tmp.empty? && tmp[0].count <= rest
        tmp2 = []
        tmp.each do |arr|
            xyz[arr.last].keys.each do |key|
                if key == b
                    ret << (arr.dup << key)
                elsif !arr.include?(key)
                    tmp2 << (arr.dup << key)
                end
            end
        end
        tmp = tmp2
    end
    return ret
end

def values(path, xyz)
    ret = []
    (0..path.count-2).each do |index|
        return nil if xyz[path[index]][path[index+1]] == nil
        ret << xyz[path[index]][path[index+1]]
    end
    return ret.sort
end

def find(rest, xyz, a, b, t)
    ret = 0
    max_depth = [rest+1, xyz.keys.count].min
    roots(xyz, a, b, rest).each do |arr|
#    (2..max_depth).each do |depth|
#        xyz.keys.permutation(depth) do |arr|
            if arr[0] == a && arr.last == b
                values = values(arr, xyz)
                next if values == nil
                t_arr = t.reverse[0..arr.count-2].reverse
                
                sum = 0
                values.each_with_index {|v, index| sum = sum + v/t_arr[index] }

                ret = sum if ret == 0
                ret = [ret, sum].min
            end
#        end
    end
    return ret
end

while true ########
# 1 <= n <= 8
# 2 <= m <= 30
# 0 <= r
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
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 ###############
