#include<cstdio>
#include<cstring>
#include<vector>
#include<queue>
#include<algorithm>
#include<cmath>
#include<climits>
#include<string>
#include<set>
#include<map>
#include<iostream>
using namespace std;
#define rep(i,n) for(int i=0;i<((int)(n));i++)
#define reg(i,a,b) for(int i=((int)(a));i<=((int)(b));i++)
#define irep(i,n) for(int i=((int)(n))-1;i>=0;i--)
#define ireg(i,a,b) for(int i=((int)(b));i>=((int)(a));i--)
typedef long long int lli;
typedef pair<int,int> mp;
#define fir first
#define sec second
#define IINF INT_MAX
#define LINF LLONG_MAX
#define eprintf(...) fprintf(stderr,__VA_ARGS__)

vector<pair<int,double> > vs[50];
double dat[10];
double d[50][1<<10];

int n,m,st,gl,tn;
int main(void){
	for(;;){
		scanf("%d%d%d%d%d",&tn,&n,&m,&st,&gl); 
		if(n==0)break;
		rep(i,tn)scanf("%lf",&dat[i]);
		reg(i,1,n)vs[i].clear();
		rep(i,m){
			int a,b,c;
			scanf("%d%d%d",&a,&b,&c);
			vs[a].push_back(mp(b,c));
			vs[b].push_back(mp(a,c));
		}
		
		fill(d[0],d[50],-1.0);
		//rep(i,50)rep(j,20)printf("%f ",d[i][j]);
		typedef pair<double,mp> dmp;
		priority_queue<dmp,vector<dmp>,greater<dmp> >que;
		
		que.push(dmp(0,mp(st,0)));
		while(!que.empty()){
			dmp pa = que.top(); que.pop();
			int no = pa.sec.fir,
				ns = pa.sec.sec;
			double co = pa.fir;
			//printf("(%d %d , %f)",no,ns,co);
			if(d[no][ns]>=0 && d[no][ns] <= co)continue;
			d[no][ns] = co;
			rep(i,tn){
				if(ns&(1<<i))continue;
				int ts = ns | (1<<i);
				rep(j,vs[no].size()){
					mp e = vs[no][j];
					int to = e.fir;
					double tc = co + (e.sec / dat[i]);
					if(d[to][ts] >=0 && d[to][ts] <= tc)continue;
					que.push(dmp(tc,mp(to,ts)));
				}
			}
		}
		
		double ans = -1;
		rep(i,1<<tn){
			double c = d[gl][i];
			if(c<0)continue;
			if(ans<0)ans = c;
			else ans = min(ans,c);
		}
		if(ans<0)printf("Impossible\n");
		else printf("%f\n",ans);
	}
	return 0;
}