#include <iostream>
#include <stdio.h>
#include <vector>
#include <queue>
using namespace std;
typedef pair<double,int> P;
typedef pair<P,int> PP;
int n,m,p,a,b,inf = 1e9;
int T[10];
double dp[31][1<<8] = {};
vector<vector<P>> v(31);

int main(){
    while(cin >> n >> m >> p >> a >> b && n>0){
        for(int i=0;i<n;i++){
            cin >> T[i];
        }
        int x,y;
        double z;
        for(int i=1;i<=m;i++) v[i].clear();
        for(int i=0;i<p;i++){
            cin >> x >> y >> z;
            v[x].push_back({z,y});
            v[y].push_back({z,x});
        }
        for(int i=1;i<=m;i++) for(int j=0;j<(1<<n);j++) dp[i][j] = inf;
        priority_queue<PP,vector<PP>,greater<PP>> Q;
        Q.push({{0,a},0});
        dp[a][0] = 0;
        while(!Q.empty()){
            PP pp = Q.top(); Q.pop();
            int now = pp.first.second,S = pp.second;
            if(dp[now][S]<pp.first.first) continue;
            for(auto x:v[now]){
                for(int i=0;i<n;i++){
                    if(S&(1<<i)) continue;
                    int nS = S|(1<<i);
                    if(dp[x.second][nS]>pp.first.first+x.first/T[i]){
                        dp[x.second][nS] = pp.first.first+x.first/T[i];
                        Q.push({{dp[x.second][nS],x.second},nS});
                    }
                }
            }
        }
        double ans = inf;
        for(int S=0;S<(1<<n);S++) ans = min(ans,dp[b][S]);
        if(inf-1<=ans && ans<=inf+1) cout << "Impossible" << endl;
        else printf("%.10f\n",ans);
    }
}
