#include<bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define REP(i,n) for(int i=0;i<(int)(n);i++)

using namespace std;
using ld=long double;
using P=pair<ld,pair<int,int> >;
struct edge{int to;ld cost;};
const int INF=1<<29;
const int MAX_V=100010;
vector<edge> G[32];
ld dp[32][1<<8];
int t[10];
int n,m,p,a,b;
//O(E*logV)
void dijkstra(int s){
  priority_queue<P,vector<P>,greater<P>> que;
  REP(i,m)REP(j,1<<n)dp[i+1][j]=INF;
  dp[s][0]=0;
  que.push(P(0,make_pair(s,0)));
  while(!que.empty()){
    P p=que.top();que.pop();
    auto v=p.second;
    REP(i,n){
      if((v.second&(1<<i)))continue;
      int nn=v.second|(1<<i);
      if(dp[v.first][nn]<p.first)continue;
      for(edge e:G[v.first]){
	if(dp[e.to][nn]>dp[v.first][v.second]+e.cost/t[i]){
	  dp[e.to][nn]=dp[v.first][v.second]+e.cost/t[i];
	  que.push(P(dp[e.to][nn],make_pair(e.to,nn)));
	}
      }
    }
  }
  double result=*min_element(dp[b],dp[b]+(1<<n));
  if(result==INF)printf("Impossible\n");
  else printf("%.3lf\n",result);
}

int main(){ _;
  int x,y;
  double z;
  while(cin>>n>>m>>p>>a>>b,(n|m|p|a|b)!=0){
    REP(i,n)cin>>t[i];
    REP(i,32)G[i].clear();
    REP(i,p){
      cin>>x>>y>>z;
      G[x].push_back(edge{y,z});
      G[y].push_back(edge{x,z});
    }
    dijkstra(a);
  }
}