#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAX_N = 10; //乗車券の枚数
const int MAX_M = 40; // 町の数
const int INF = 1e9;
int t[MAX_N];
int d[MAX_M][MAX_M];
double dp[1<<MAX_N][MAX_M];

int N,M,P,a,b;

void chmin(double &a, double b){ if( a > b){ swap(a,b);} return ;}

void solve(){
  for(int i = 0; i < (1<<MAX_N); i++){ 
    for(int j = 0; j < MAX_M; j++){ 
      dp[i][j] = INF;}}
  dp[(1<<N)-1][a] = 0;
  //スタート地点にいて、かつチケットを全部持っている状態に達するまでのコストは0
  double res = INF;
  for(int  S = (1<<N)-1; S >= 0; S--){
    chmin(res, dp[S][b]);
    for(int u = 0; u < M; u++){
      for(int i = 0; i < N; i++){
        if( S >> i & 1){ 
          for(int v = 0; v < M; v++){ 
            if( d[u][v] != -1){
              chmin(dp[S & ~(1<<i)][v],dp[S][u]+(double)d[u][v]/t[i]);}
          }
        }
      }
    }
  }
  if( res == INF){ cout << "Impossible" << endl;}
  else{
    cout << fixed << setprecision(10) << res << endl;}
  return;
}

int main(){
  while(true){
    cin >> N >> M >> P >> a >> b;
    if( N == 0 && M == 0 && P == 0 && a == 0 && b == 0){
      break;}
    
    a--; b--;
    
    for(int i = 0; i < MAX_M; i++){
      for(int j = 0; j < MAX_M; j++){ 
        d[i][j] = -1;}}
    
    for(int i = 0; i < N; i++){ cin >> t[i];}
    
    for(int i = 0; i < P; i++){
      int x,y,dist ; cin >> x >> y >> dist ;
      x--; y--;
      d[x][y] = dist; d[y][x] = dist;
    }
    solve();
  }
  
  return 0;}
                
               
    
  
             
