#include<iostream>
#include<cstdio>
#include<queue>
#include<algorithm>
using namespace std;
struct edge{int to,cost;};
struct state{
  int pos,S;
  double cost;
  bool operator < (const state &p)const{
    return cost > p.cost;
  }
};

int n,m,p,a,b;
double t[8];
vector<edge> G[31];
double d[31][(1<<8)];
void init(){
  for(int i=0;i<31;i++){
    G[i].clear();
    for(int j=0;j<(1<<8);j++)d[i][j]=(1<<26);
  }
}

void solve(){
  d[a][0]=0;
  priority_queue<state> Q;
  Q.push((state){a,0,0});
  while(!Q.empty()){
    state s=Q.top();Q.pop();
    if(s.pos==b){
      printf("%.8f\n",s.cost);
      return;
    }
    if(s.cost>d[s.pos][s.S])continue;
    for(int i=0;i<(int)G[s.pos].size();i++){
      edge e=G[s.pos][i];
      for(int j=0;j<n;j++){
	if((s.S>>j)&1)continue;
	int nS=s.S+(1<<j);
	if(s.cost+e.cost/t[j]<d[e.to][nS]){
	  d[e.to][nS]=s.cost+e.cost/t[j];
	  Q.push((state){e.to,nS,d[e.to][nS]});
	}
      }
    }
  }
  cout<<"Impossible"<<endl;
}

int main(){
  while(1){
    cin>>n>>m>>p>>a>>b;
    if(n+m+p+a+b==0)break;
    init();
    for(int i=0;i<n;i++)cin>>t[i];
    for(int i=0;i<p;i++){
      int x,y,z;
      cin>>x>>y>>z;
      G[x].push_back((edge){y,z});
      G[y].push_back((edge){x,z});
    }
    solve();
  }
  return 0;
}