import std.stdio;
import std.ascii;
import std.range;
import std.array;
import std.functional;
import std.algorithm;
import std.conv;
import std.container;
import std.math;
import std.numeric;
import std.string;
import std.c.string;
import std.random;
import std.regex;
import std.typecons;

struct Edge {
    int from, to, cost;
}

int N, M, P, A, B;
int[] T;
Edge[][] G;

bool input() {
    scanf("%d %d %d %d %d\n", &N, &M, &P, &A, &B);
    if (N == 0) return false;
    A--; B--;
    T = readln.chomp.split(" ").map!(to!int).array;
    G = new Edge[][M];
    foreach (i; 0 .. P) {
        int x, y, z;
        scanf("%d %d %d\n", &x, &y, &z);
        x--; y--;
        G[x] ~= Edge(x, y, z);
        G[y] ~= Edge(y, x, z);
    }
    return true;
}

double INF = 1e10;

void solve() {
    auto memo = new double[][](M, 1 << N);
    foreach (i; 0 .. M) memo[i][] = -1;

    double dfs(int v, int bit) {
        if (v == B) return 0.0;
        if (memo[v][bit] >= 0) return memo[v][bit];
        auto ret = INF;
        foreach (e; G[v]) {
            auto next = e.to;
            auto dist = e.cost;
            foreach (i; 0 .. N) {
                if (bit & (1 << i)) {
                    ret = min(ret, dfs(next, bit & ~(1 << i)) + cast(double)(dist) / T[i]);
                }
            }
        }
        return memo[v][bit] = ret;
    }

    auto ans = dfs(A, (1 << N) - 1);
    if (ans == INF) {
        writeln("Impossible");
    } else {
        writefln("%.8f", ans);
    }
}

void main() {
    while (input) solve;
}