#include <bits/stdc++.h>
#define MOD 1000000007
typedef long long ll;
using namespace std;

#define mkp make_pair
#define mkt make_tuple

int N,M,P,A,B;
int t[10];

vector<pair<int,double>> g[50];

const double INF=1e9;

double dijkstra(){
    double dist[M+1][(1<<N)];
    for(int i=1;i<=M;i++){
        for(int j=0;j<(1<<N);j++){
            dist[i][j]=INF;
        }
    }

    dist[A][(1<<N)-1]=0;
    priority_queue<tuple<double,int,int>> PQ;
    PQ.push(mkt(0,A,(1<<N)-1));
    while(!PQ.empty()){
        double cost;
        int v,state;

        auto f=PQ.top();
        cost=get<0>(f);
        v=get<1>(f);
        state=get<2>(f);
        PQ.pop();

        cost*=(-1);

        if(dist[v][state]<cost) continue;
        if(v==B) return cost;

        for(auto nex:g[v]){
            for(int i=0;i<N;i++){
                if(state&(1<<i)){
                    double neco=nex.second/t[i];
                    if(dist[nex.first][state^(1<<i)]>cost+neco){
                        dist[nex.first][state^(1<<i)]=cost+neco;
                        PQ.push(mkt(-dist[nex.first][state^(1<<i)],nex.first,state^(1<<i)));
                    }
                }
            }
        } 
    }

    return -1;
}

void solve(){
    for(int i=0;i<N;i++) cin>>t[i];
    for(int i=0;i<=M;i++) g[i].clear();

    for(int i=0;i<P;i++){
        int x,y;
        double z;
        cin>>x>>y>>z;
        g[x].push_back(mkp(y,z));
        g[y].push_back(mkp(x,z));
    }

    double res=dijkstra();
    if(res==-1) cout<<"Impossible"<<endl;
    else cout<<fixed<<setprecision(10)<<res<<endl;
}

int main(){
  while(1){
      cin>>N>>M>>P>>A>>B;
      if(N==0&&M==0&&P==0&&A==0&&B==0) break;
      solve();
  }

  return 0;
}

