#include <tuple>
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
int H[8];
typedef pair<int,double> P;
typedef tuple<double,int,int> T;
vector<P> G[30];
priority_queue<T,vector<T>,greater<T>> que;
double memo[30][1<<8];

int main(){
    int n,m,p,a,b;
    while(cin>>n>>m>>p>>a>>b,n){
        a--;b--;
        for(int i=0;i<n;i++) cin>>H[i];
        for(int i=0;i<30;i++) G[i].clear();
        for(int i=0;i<p;i++){
            int x,y,z;
            cin>>x>>y>>z;
            x--; y--;
            G[x].emplace_back(y,z);
            G[y].emplace_back(x,z);
        }
        fill(memo[0],memo[30],1e9);
        memo[a][(1<<n)-1]=0;
        que.emplace(0,a,(1<<n)-1);
        while(!que.empty()){
            auto t=que.top(); que.pop();
            double cost=get<0>(t);
            int city=get<1>(t);
            int tickets=get<2>(t);
            if(city==b){
                cout.precision(3);
                cout<<fixed<<cost<<endl;
                break;
            }
            if(cost>memo[city][tickets]) continue;
            for(int i=0;i<n;i++){
                if((1<<i)&tickets){
                    for(auto r:G[city]){
                        int to=r.first;
                        double length=cost+r.second/H[i];
                        if(memo[to][tickets^(1<<i)]>length){
                            memo[to][tickets^(1<<i)]=length;
                            que.emplace(length,to,tickets^(1<<i));
                        }
                    }
                }
            }
        }
        if(que.empty()){
            cout<<"Impossible"<<endl;
        }else{
            while(!que.empty()) que.pop();
        }
    }
    return 0;
}