#include <bits/stdc++.h>

#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)

using namespace std;

const double inf=1e8;

int d[31][31];
int t[10];
double dist[31][1<<8];

int n,m,p,a,b;

typedef tuple<double,int,int> state;
void dijkstra(){
	rep(i,m)rep(j,(1<<n)) dist[i][j]=inf;
	state init=make_tuple(0.0,a,0);
	dist[a][0]=0;
	priority_queue<state,vector<state>,greater<state>>q;
	q.push(init);
	while(!q.empty()){
		double cost;
		int cur,mask;
		tie(cost,cur,mask)=q.top();q.pop();
		rep(i,m){
			if(d[cur][i]==inf) continue;
			rep(j,n){
				if(mask&(1<<j)) continue;
				int ncur=i,nmask=mask|(1<<j);
				double ncost=cost+1.0*d[cur][ncur]/(t[j]);
				if(dist[ncur][nmask]>ncost){
					dist[ncur][nmask]=ncost;
					q.push(make_tuple(ncost,ncur,nmask));
				}
			}
		}
	}
	double ans=inf;
	rep(i,1<<n) ans=min(ans,dist[b][i]);
	cout.precision(10);
	if(ans==inf)
		cout << "Impossible" << endl;
	else
		cout << fixed << ans << endl;
}

int main(void){
	while(cin >> n >> m >> p >> a >> b){
		a--,b--;
		if(n==0) break;
		rep(i,n) cin >> t[i];
		rep(i,m)rep(j,m) d[i][j]=inf;
		rep(i,p){
			int x,y,z;
			cin >> x >> y >> z;
			x--,y--;
			d[x][y]=d[y][x]=z;
		}
		dijkstra();
	}
	return 0;
}