#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define INF 100000000.0
#define EPS 1e-10
#define MOD 1000000007
using namespace std;
typedef pair<double, int> P;

int n, m, p, a, b;
int t[8];
double dist[(1<<8)*30+30];
vector<P> e[(1<<8)*30+30];

void solve(){
	rep(i,n) cin >> t[i];
	rep(i,(1<<8)*30+30) dist[i] = INF;
	rep(i,(1<<8)*30+30) e[i].clear();
	rep(i,p){
		int x, y; double z;
		cin >> x >> y >> z;
		x--; y--;
		rep(j,(1<<n)){
			rep(k,n){
				if((j&(1<<k)) != 0) continue;
				e[j*30+x].push_back(P(z/t[k],(j+(1<<k))*30+y));
				e[j*30+y].push_back(P(z/t[k],(j+(1<<k))*30+x));
			}
		}
	}
	priority_queue<P,vector<P>, greater<P> > que;
	dist[a] = 0.0;
	que.push(P(0.0,a));
	while(true){
		if(que.size() == 0) break;
		P q = que.top();
		que.pop();
		if(q.first > dist[q.second]) continue;
		rep(i,e[q.second].size()){
			P x = e[q.second][i];
			if(dist[x.second] > q.first+x.first){
				dist[x.second] = q.first+x.first;
				que.push(P(dist[x.second],x.second));
			}
		}
	}
	double ans = INF;
	rep(i,(1<<n)) ans = min(ans,dist[i*30+b]);
	if(ans == INF) puts("Impossible");
	else printf("%.9f\n",ans);
}

int main(){
	while(cin >> n >> m >> p >> a >> b){
		if(n==0&&m==0&&p==0&&a==0&&b==0) break;
		a--; b--;
		solve();
	}
}