#include<stdio.h>
#define NMAX 8
#define MMAX 30
#define INF 1e10

int main(void)
{
  int i, v, u, S, n, m ,p, a, b, x, y, z, t[NMAX], dist[MMAX][MMAX];
  double res, dp[1<<NMAX][MMAX];
  while (1) {
    scanf("%d%d%d%d%d", &n, &m, &p, &a, &b);
    if (!(n | m | p | a | b)) break;
    for (i = 0; i < n; i++) scanf("%d", &t[i]);
    for (i = 0; i < m; i++) {
      for (v = 0; v < m; v++) {
        dist[i][v] = -1;
      }
    }
    for (i = 0; i < p; i++) {
      scanf("%d%d%d", &x, &y, &z);
      dist[x-1][y-1] = dist[y-1][x-1] = z;

    }
    for (i = 0; i < 1 << n; i++) {
      for (v = 0; v < m; v++) {
        dp[i][v] = INF;
      }
    }
    dp[(1<<n)-1][a-1] = 0;
    res = INF;
    for (S = (1 << n) - 1; S >= 0; S--) {
      if (res > dp[S][b-1]) res = dp[S][b-1];
      for (v = 0; v < m; v++) {
        for (i = 0; i < n; i++) {
          if (S >> i & 1) {
            for (u = 0; u < m; u++) {
              if (dist[v][u] >= 0) {
                double temp = dp[S][v] + (double)dist[v][u] / t[i];
                if (dp[S&~(1<<i)][u] > temp) dp[S&~(1<<i)][u] = temp;
              }
            }
          }
        }
      }
    }
    if (res == INF) printf("Impossible\n");
    else printf("%.3f\n", res);
  }
}
