#include <bits/stdc++.h>

#define LL long long
#define VI vector<int>
#define VVI vector<vector<int>>
#define VVVI vector<vector<vector<int>>>
#define VL vector<LL>
#define VVL vector<vector<LL>>
#define VVVL vector<vector<vector<LL>>>
#define VB vector<bool>
#define FOR(i,a,b) for(int i= (a); i<((int)b); ++i)
#define RFOR(i,a) for(int i=(a); i >= 0; --i)
#define FOE(i,a) for(auto i : a)
#define ALL(c) (c).begin(), (c).end()
#define RALL(c) (c).rbegin(), (c).rend()
#define DUMP(x)  cerr << #x << " = " << (x) << endl;
#define SUM(x) std::accumulate(ALL(x), 0LL)
#define MIN(v) *std::min_element(v.begin(), v.end())
#define MAX(v) *std::max_element(v.begin(), v.end())
#define EXIST(v,x) (std::find(v.begin(), v.end(), x) != v.end())
#define BIT(n) (1LL<<(n))
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define EPS 1e-14

template<class T> T ceil(T a, T b) { return (a + b - 1) / b; }
template<class T> void print(T x) { std::cout << x << std::endl; }

const std::string YES = "YES", Yes = "Yes", NO = "NO", No = "No";
const std::vector<int> dy = { 0, -1, 0, 1 }, dx = { 1, 0, -1, 0 };    // 4近傍（右, 下, 左, 上）

using namespace std;

struct State{
    double dist;
    int ticket;
    int node;
    bool operator < (const State &p)const{
        return dist > p.dist;
    }
};

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    while (true) {
        int n, m, p, a, b;
        cin >> n >> m >> p >> a >> b;
        if (n == 0 and m == 0 and p == 0 and a == 0 and b == 0) { break; }
        a--; b--;
        vector<int> T(n);
        FOR(i, 0, n) {
            cin >> T[i];
        }

        vector<vector<pair<int, int>>> graph(m);
        FOR(i, 0, p) {
            int x, y, z;
            cin >> x >> y >> z;
            x--; y--;
            graph[x].emplace_back(make_pair(y, z));
            graph[y].emplace_back(make_pair(x, z));
        }

        //[(最短距離, チケット, node番号)]のque(距離が近い順にとりだす)
        priority_queue<State> que;
        que.push(State{0.0, 0, a});

        vector<vector<double>> dist_list(m + 1, vector<double>(1 << n, INT_MAX));   // startからの距離
        dist_list[a][0] = 0;

        while (not que.empty()) {
            auto state = que.top(); que.pop();
            double now_dist = state.dist;
            int bit = state.ticket;
            int from = state.node;

            if (dist_list[from][bit] < now_dist) {
                continue;
            }

            for (auto p : graph[from]) {
                int to = p.first;
                double dist = p.second;

                FOR(t, 0, n) {
                    if ((bit & (1 << t)) != 0) { continue; }

                    double cost = 1.0 * dist / T[t];
                    double new_dist = now_dist + cost;
                    int new_bit = (bit | (1 << t));
                    if (new_dist < dist_list[to][new_bit]) {
                        dist_list[to][new_bit] = new_dist;
                        que.push(State{new_dist, new_bit, to});
                    }
                }
            }
        }

        double ans = INT_MAX;
        FOR(t, 0, 1 << n) {
            ans = min(ans, dist_list[b][t]);
        }
        if (ans == INT_MAX) {
            print("Impossible");
        } else {
            print(ans);
        }
    }
    return 0;
}


Measured memory_bytes: 4688