#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> mp;
double inf =  1e9;
typedef pair<double,mp> mmp;

int main(){
 while(1){
  ll n,m,p,a,b;
  cin>>n>>m>>p>>a>>b;
  if( n == 0 ) break;
  vector<ll> t(n);
  for(ll i=0;i<n;i++)cin>>t[i];
  a--,b--;
  vector<vector<double> > dp( m , vector<double>( 1<<n , inf ) );
  
  vector<vector<mp> > g(m);
  for(ll i=0;i<p;i++){
   ll x,y,z;
   cin>>x>>y>>z;
   x--,y--;
   g[x].push_back( mp(z,y) );
   g[y].push_back( mp(z,x) );
  }

  double ans = inf;
  priority_queue<mmp,vector<mmp> , greater<mmp> > q;
  q.push( mmp( 0.0 , mp((1<<n)-1,a) ) );
 
  while(!q.empty() ){
   mmp now = q.top();
   q.pop();
   double time = now.first;
   ll ticket = now.second.first;
   ll nn = now.second.second;
 //  cout<<nn<<' '<<time<<endl;
   if( nn == b ){
    ans = time;
    break;
   }
   if( dp[nn][ticket] <=  time  ){
    continue;
   }
   dp[nn][ticket] = time;
   for(ll i=0;i<g[nn].size();i++){
    for(ll j=0;j<n;j++){
     if( (ticket>>j)&1 ){
      ll next = g[nn][i].second;
      double ntime = time + ( ( (double) g[nn][i].first ) / t[j]);
      ll nextt = ticket^(1ll<<j);
      if( dp[next][nextt] != inf ) continue;
      q.push( mmp( ntime , mp( nextt , next ) ) );

     }
    }
   }
  }
  for(ll i=0;i<(1<<n);i++) ans = min( ans , dp[b][i] );


  if( ans == inf ){
   cout<<"Impossible"<<endl;
  }else{
   //cout<<ans<<endl;
   printf("%0.9lf\n",ans);
  }

 }
    return 0;
}

