#include <bits/stdc++.h>
using namespace std;
#define int long long   // <-----!!!!!!!!!!!!!!!!!!!

#define rep(i,n) for (int i=0;i<(n);i++)
#define rep2(i,a,b) for (int i=(a);i<(b);i++)
#define rrep(i,n) for (int i=(n)-1;i>=0;i--)
#define rrep2(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define all(a) (a).begin(),(a).end()

typedef long long ll;
typedef pair<int, int> P;

struct edge { int to; double cost; };

signed main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);

	int n, m, p, a, b;
	while (cin >> n >> m >> p >> a >> b, n) {
		a--; b--;
		vector<double> t(n);
		rep(i, n) cin >> t[i];
		vector<vector<edge>> G(m);
		rep(i, p) {
			int x, y;
			double z;
			cin >> x >> y >> z;
			x--; y--;
			G[x].emplace_back((edge){y, z});
			G[y].emplace_back((edge){x, z});
		}

		const double inf = 1e15;
		vector<vector<double>> d(m, vector<double>(1 << n, inf));
		d[a][0] = 0;
		queue<P> que;
	    que.push(P(a, 0));

	    while (!que.empty()) {
			int v, f;
			tie(v, f) = que.front(); que.pop();
	        for (auto e: G[v]) {
				int nv = e.to;
				double cost = e.cost;
				rep(i, n) {
					if (((f >> i) & 1) == 0) {
						int nf = f | (1 << i);
						if (d[nv][nf] > d[v][f] + cost / t[i]) {
							d[nv][nf] = d[v][f] + cost / t[i];
							que.push(P(nv, nf));
						}
					}
				}
	        }
	    }

		double ans = *min_element(all(d[b]));
		if (ans == inf) {
			printf("Impossible\n");
		} else {
			printf("%.3f\n", ans);
		}
	}
}