#include <vector>
#include <list>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <cstdio>
#include <climits>
#include <complex>
#include <cstdint>
#include <tuple>

#define M_PI       3.14159265358979323846

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }
inline int readInt() { int x; scanf("%d", &x); return x; }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;

//container util

//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define SQ(a) ((a)*(a))
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,s,n) for(int i=s;i<(int)n;++i)
#define REP(i,n) FOR(i,0,n)
#define MOD 1000000007

int main() {
    cout << fixed << setprecision(8);
    int n, m, p, a, b;
    while(cin >> n >> m >> p >> a >> b){
        if(n==0&&m==0&&p==0&&a==0&&b==0) break;
        a--;
        b--;
        vector<int> t; // n
        for(int i=0; i<n; ++i){
            int a; cin >> a;
            t.push_back(a);
        }

        double dp[1<<8][40];
        REP(i, (1<<8)){
            REP(j, 40){
                dp[i][j] = 1e9;
            }
        }

        double d[40][40];
        REP(i,40){
            REP(j, 40){
                d[i][j] = -1;
            }
        }
        REP(i, p){
            int x, y, c; cin >>x >>y >> c;
            x--;
            y--;
            d[x][y] = c;
            d[y][x] =c;
        }

        dp[(1<<n)-1][a] = 0;
        double res = 1e9;
        for(int bit= (1<<n)-1; bit>=0; --bit){
            res = min(res, dp[bit][b]);
            for(int v=0; v<m; ++v){
                for(int i=0; i<n; ++i){
                    if(!(bit >> i & 1)) continue;

                    for(int u=0; u<m; ++u){
                        if(d[v][u]>=0){
                            dp[bit & ~(1 << i)][u] = min(dp[bit & ~(1<<i)][u],
                                    dp[bit][v] + (double)d[v][u]/t[i]);
                        }
                    }
                }
            }
        }

        if(res == 1e9){
            cout << "Impossible" << endl;
        }else{
            cout << res << endl;
        }
    }
    return 0;
}


Measured memory_bytes: 3308