def calc(arr, xyz, a, b, t)
    values = values(arr, xyz)
#    return nil if values == nil
    t_arr = t.reverse[0..arr.count-2]
    
    sum = 0
    values.each_with_index {|v, index| sum = sum + v/t_arr[index] }
    return sum
end
def find(rest, xyz, a, b, t)
    ret = 0
    tmp = [[a]]
    while !tmp.empty? && tmp[0].count <= rest
        tmp2 = []
        tmp.each do |arr|
            xyz[arr.last].keys.each do |key|
                if key == b
                    sum = calc(arr.dup << key, xyz, a, b, t)
                    ret =  ret == 0 ? sum : [ret, sum].min
                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.reverse
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 ###############
