#include<iostream>
#include<vector>
#include<queue>
#include<algorithm>

using namespace std;

#define INF (1 << 30)

struct Route
{
    int x, y, z;
};

struct Path
{
    int mask;
    int city;
    vector<int> pathCost;
};

bool solve()
{
    int n, m, p, a, b;
    cin >> n >> m >> p >> a >> b;

    if( (n | m | p | a | b) == 0 )return false;

    //?????????????????????????????????
    a--;
    b--;

    vector<int> t(n);

    for(auto& _t : t)
    {
        cin >> _t;
    }

    //dummy data
    t.push_back(-10);

    sort(t.begin(), t.end(), std::greater<int>());

    vector<Route> route(p);
    vector<Route> bin[30];

    for(auto& r : route)
    {
        cin >> r.x;
        cin >> r.y;
        cin >> r.z;

        //?????????????????????????????????
        r.x--;
        r.y--;

        bin[r.x].push_back(r);
        bin[r.y].push_back(Route{ r.y, r.x, r.z }); 
    }

    for(int i = 0; i < 30; i++)
    {
//        if(bin[i].size())cout << i << " : " << bin[i].size() << endl;
    }

    //a???start
    //b???goal
    queue<Path> que;
    queue<Path> ansPath;

    Path tmp{ 1 << a, a };
    tmp.pathCost.push_back(0);

    que.push(tmp);

    double minCost[30] = {};
    for(auto &mc : minCost)
    {
        mc = INF;
    }
    minCost[a] = 0.0;

    //n?????¬??????????????°
    for(int i = 0; i < n; i++)
    {
        while(que.front().pathCost.size() == (i + 1))
        {
            //que.front???????????¶???
            int nowCity = que.front().city;
            //cout << "now : " << nowCity << " loops " << bin[nowCity].size() << "times\n";
            for(int j = 0; j < bin[nowCity].size(); j++)
            {
                //?????§?????\??????????????????????????????
                if(que.front().mask & 1 << bin[nowCity][j].y)        
                {
                    //cout << bin[nowCity][j].y << " skip\n";
                    continue;
                }
                //????????????????§??????????
                Path next = que.front();
                next.mask |= 1 << bin[nowCity][j].y;
                next.city = bin[nowCity][j].y;
                next.pathCost.push_back(bin[nowCity][j].z);

                //?????£???????????????????????§???????????°?????????
                sort(next.pathCost.begin(), next.pathCost.end(), std::greater<int>());

                double cost_tmp = 0.0;
                for(int i = 0; i < next.pathCost.size(); i++)
                {
                    //cout << cost[i] << " " << t[i] << endl;
                    cost_tmp += (double)next.pathCost[i] / (double)t[i];
                }

                if(cost_tmp < minCost[next.city]) minCost[next.city] = cost_tmp;
                else continue;
            

                //cout << " next : " << next.city << endl;

                //???????????????????????????
                if(next.city == b) ansPath.push(next);
                else que.push(next);
            }

            que.pop();
            //cout << " : " << que.size() << " " << ansPath.size() << endl;
        }
    }


    if(minCost[b] >= INF - 1){
        cout << "Impossible\n";
        return true;
    }

    cout << minCost[b] << endl;

    return true;

}

int main()
{   
    while( solve() );

    return 0;
}

Measured memory_bytes: 3232