#include<bits/stdc++.h>
using namespace std;

using i64 = int64_t;

constexpr double INF = 1e9;
constexpr double EPS = 1e-6;

struct Node{
    int num, tickets;
    double cost;
    bool operator<(const Node &obj)const{
        return cost > obj.cost + EPS;
    }
};

struct Edge{
    int from, to;
    double cost;
};

double mini[300][40]={0};

void init(){
    for(int i=0;i<300;++i){
        for(int j=0;j<40;++j){
            mini[i][j] = INF;
        }
    }
}

int main(){
    int n, m, p, a, b;
    while(cin >> n >> m >> p >> a >> b, n != 0){
        vector<int> v;
        for(int i=0;i<n;++i){
            int t;
            cin >> t;
            v.push_back(t);
        }
        vector<vector<Edge>> graph(m+1, vector<Edge>());
        for(int i=0;i<p;++i){
            int x, y;
            double z;
            cin >> x >> y >> z;
            graph[x].push_back({x, y, z});
            graph[y].push_back({y, x, z});
        }
        init();
        priority_queue<Node> que;
        mini[0][a] = 0;
        que.push({a, 0, 0});
        bool ok = false;
        while(!que.empty()){
            auto curr = que.top(); que.pop();
            if(curr.num == b){
                printf("%.10f\n", curr.cost);
                ok = true;
                break;
            }
            for(auto edge: graph[curr.num]){
                for(int i=0;i<n;++i){
                    if(curr.tickets & (1<<i))continue;
                    double newcost = curr.cost + (edge.cost / (double)v[i]);
                    int tickets = (curr.tickets | (1<<i));
                    if(mini[tickets][edge.to] < newcost + EPS)continue;
                    mini[tickets][edge.to] = newcost;
                    que.push({edge.to, tickets, newcost});
                }
            }
        }
        if(!ok) cout << "Impossible" << endl;
    }

    return 0;
}

