#include<iostream>
#include<sstream>
#include<algorithm>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<ctime>
#include<cfloat>
#include<functional>
#include<map>
#include<string>
#include<cstring>
#include<vector>
#include<queue>
#include<stack>
#include<deque>
#include<set>
#include<bitset>
#include<list>
#include<numeric>
#include<complex>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<long long, int> ll_i;
typedef pair<double, int> d_i;
typedef pair<long long, long long> ll_ll;
typedef pair<double, double> d_d;
typedef vector<int> Vint;

#define PI 3.141592653589793238462643383279
#define mod 1000000007LL
#define rep(i, n) for(i = 0;i < n;++i)
#define rep1(i, n) for(i = 1;i < n;++i)
#define rep2d(i, j, n) for(i = 0;i < n;++i)for(j = i + 1;j < n;++j)
#define per(i, n) for(i = n - 1;i > -1;--i)
#define int(x) int x; scanf("%d",&x)
#define int2(x, y) int x, y; scanf("%d%d",&x, &y)
#define int3(x, y, z) int x, y, z; scanf("%d%d%d",&x, &y, &z)
#define int4(v, x, y, z) int v, x, y, z; scanf("%d%d%d%d", &v, &x, &y, &z)
#define int5(v, w, x, y, z) int v, w, x, y, z; scanf("%d%d%d%d%d", &v, &w, &x, &y, &z)
#define scn(n, a) rep(i, n)cin >> a[i]
#define sc2n(n, a, b) rep(i, n)cin >> a[i] >> b[i]
#define pri(x) cout << x << "\n"
#define pri2(x, y) cout << x << " " << y << "\n"
#define pri3(x, y, z) cout << x << " " << y << " " << z << "\n"
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define endl "\n"
#define kabe puts("---------------------------")
#define kara puts("")
#define debug(x) cout << " --- " << x << "\n"
#define debug2(x, y) cout << " --- " << x << " " << y << "\n"
#define debug3(x, y, z) cout << " --- " << x << " " << y << " " << z << "\n"
#define X first
#define Y second
#define eps 0.0001
#define prid(x) printf("%.15lf\n", x)

struct edge{
  int tom, tos;
  double cost;
};
struct state{
  int m, s; double t;
  bool operator<(const state &st)const{ return t > st.t; }
};

vector<edge> G[30][300];
int l[10] = {1};
double t[10];

double dinf = 3141592.6535;
double dijkstra2d(int v, int x, int r, int g){
  int i, j;

  double d[v][x]; rep(i, v)rep(j, x)d[i][j] = dinf;
  d[r][x - 1] = 0.0;
  priority_queue<state> Q;
  Q.push((state){r, x - 1, 0.0});

  for(;!Q.empty();){
    state now = Q.top();
    Q.pop();
    if(d[now.m][now.s] < now.t)continue;
    rep(i, G[now.m][now.s].size()){
      edge tmp = G[now.m][now.s][i];
      if(d[tmp.tom][tmp.tos] > d[now.m][now.s] + tmp.cost){
        d[tmp.tom][tmp.tos] = d[now.m][now.s] + tmp.cost;
        Q.push((state){tmp.tom, tmp.tos, d[tmp.tom][tmp.tos]});
      }
    }
  }
  double res = dinf;
  rep(j, x)res = min(res, d[g][j]);
  if(res == dinf)puts("Impossible");
  else prid(res);
  return res;
}

signed main(void){
  int i, j, k;
  rep1(i, 10)l[i] = l[i - 1] + l[i - 1];
  for(int testcase = 0;testcase >= 0;testcase++){
    int5(n, m, p, a, b);
    if((n | m | p | a | b) == 0)break;
    --a; --b;
    scn(n, t);
    rep(i, p){
      int2(x, y); double z; cin >> z;
      --x; --y;
      rep(j, l[n])rep(k, n)if(j & l[k]){
        G[x][j].pb((edge){y, j - l[k], z / t[k]});
        G[y][j].pb((edge){x, j - l[k], z / t[k]});
      }
    }
    dijkstra2d(m, l[n], a, b);
    rep(i, m)rep(j, l[n])G[i][j].clear();
  }
  return 0;
}

Measured memory_bytes: 24212