#include <stdio.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <cstdio>
#include <ctime>
#include <assert.h>
#include <chrono>
#include <random>
#include <numeric>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
using namespace std;
typedef long long int ll;
typedef unsigned long long ull;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
    return (ull)rng() % B;
}

double d[31][1<<8];
vector<pair<int,int>> g[31];

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int n,m,p,a,b;
	while(cin >> n >> m >> p >> a >> b,n){
		a--; b--;
		for(int i=0;i<m;i++){
			for(int j=0;j<(1<<n);j++){
				d[i][j]=1e18;
			}
			g[i].clear();
		}
		vector<int> t(n);
		for(int i=0;i<n;i++){
			cin >> t[i];
		}
		while(p--){
			int x,y,z; cin >> x >> y >> z;
			x--; y--;
			g[x].push_back(make_pair(y,z));
			g[y].push_back(make_pair(x,z));
		}
		d[a][0]=0;
		priority_queue<pair<double,pair<int,int>>> q;
		q.push(make_pair(0.0,make_pair(a,0)));
		while(q.size()){
			auto p=q.top(); q.pop();
			int s=p.second.first;
			int now=p.second.second;
			if(p.first!=-d[s][now])continue;
			for(int i=0;i<n;i++){
				if((1<<i)&now)continue;
				for(auto to:g[s]){
					double cost=(double)(to.second)/t[i];
					if(d[to.first][now|(1<<i)]>d[s][now]+cost){
						d[to.first][now|(1<<i)]=d[s][now]+cost;
						q.push(make_pair(-d[to.first][now|(1<<i)],make_pair(to.first,now|(1<<i))));
					}
				}
			}
		}
		double res=1e18;
		for(int i=0;i<(1<<n);i++){
			res=min(res,d[b][i]);
		}
		if(res==1e18){
			printf("Impossible\n");
		}
		else{
			printf("%.3f\n",res);
		}
	}
}
