#include<vector>
#include<queue>
#include<iostream>
#include<cstdlib>
#include<cmath>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<stack>
#include<string>
#include<map>
#include<set>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define INF 1<<29
#define MAX 30
using namespace std;
int n,m,p,a,b;

int main(){
  int tes,x,y;
  double tk;
  int d[31][31];
  double dp[1<<9][31];
  vector<double> ticket;
  while(true){
    cin >> n >> m >> p >> a >> b;
    if(n+m+p+a+b == 0)break;
    ticket.clear();   
    rep(i,31)rep(j,31)d[j][i] = INF;

    rep(i,n){
      cin >> tk;
      ticket.push_back(tk);
    }
    rep(i,p){
      cin >> x >> y >> tes;
      d[x][y] = d[y][x] = tes;
    }
  
    for(int i=0;i<(1<<9);i++){
      for(int j=0;j<31;j++)dp[i][j] = INF;
    }
    dp[(1<<n)-1][a] = 0;

    double ans = INF;
    for(int S = (1<<n)-1; S>=0 ;S--){
      ans = min(ans,dp[S][b]);
      for(int v = 1; v<=m ;v++){
	for(int t = 0; t<n ;t++){
	  if(!(S>>t &1))continue;
	  for(int u = 1; u<=m;u++){
	    if(d[v][u] == INF)continue;	    
	    dp[S & ~(1<<t)][u] = min(dp[S & ~(1<<t)][u],dp[S][v] + (double)(d[v][u]/ticket[t]) );	    
       
	  }
	}
      }
    }
    if(ans == INF)cout << "Impossible" << endl;
    else printf("%.3f\n",ans);
 
  }
  return 0;
}