//1444
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cassert>
#include<sstream>
#include<iostream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<cstring>

using namespace std;

typedef unsigned uint;
typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;


struct edge{
	int fr;
	int to;
	double d;
	int j;
	edge(int f,int t,double d0,int j0){
		fr=f;
		to=t;
		d=d0;
		j=j0;
	}
};
struct cmp{
	bool operator()(edge a,edge b){
		return a.d>b.d;
	}
};


int main(){
	int n,m,p,a,b;
	while(cin >> n >> m >> p >> a >> b){
		a--;
		b--;
		if(n==0) break;
		vector<vector<edge> > g(m);
		vint baken(n);
		for(int i=0;i<n;i++) cin >> baken[i];
		for(int i=0;i<p;i++){
			edge e(0,0,0,0);
			cin >> e.fr >> e.to >> e.d;
			e.fr--;
			e.to--;
			g[e.fr].push_back(e);
			g[e.to].push_back(edge(e.to,e.fr,e.d,0));
		}
		
		int prev[31][1<<9];
		priority_queue<edge,vector<edge>,cmp> pq;
		memset(prev,-1,sizeof(prev));
		
		edge e(-2,a,0,0);
		pq.push(e);
		
		int imp=1;
		while(!pq.empty()){
			e=pq.top();
//			cout << e.fr << " " << e.to << " " << e.d << endl;
			pq.pop();
			if(prev[e.to][e.j]!=-1) continue;
			prev[e.to][e.j]=e.d;
			if(e.to==b){
				imp=0;
				break;
			}
			for(int i=0;i<g[e.to].size();i++){
				for(int j=1,k=0;j<(1<<n);j*=2,k++){
					if((e.j&j)==0){
						pq.push(edge(e.to,g[e.to][i].to,e.d+((double)g[e.to][i].d/baken[k]),(e.j|j)));
					}
				}
			}
		}
		if(imp==0){
			printf("%.5f\n",e.d);
		}else{
			printf("Impossible\n");
		}
	}
	
	return 0;
}
	