#include <iostream>
#include <tuple>
#include <set>
#include <vector>
#include <deque>
#include <queue>
#include <algorithm>

typedef std::tuple<int, int, double> T;

std::vector<T> dis_city;
std::vector<int> num_basya;
int n, m, p, a, b;

std::vector<std::tuple<int,int>> table;
double cost[1<<8][30];


double search()
{
	for ( int i = 0; i < (1<<n); ++i ) {
		for ( int k = 0; k < m; ++k ) {
			cost[i][k] = 0xffff;
		}
	}
	cost[(1<<n)-1][a] = 0;
	double ans = 0xffff;

	std::priority_queue<std::tuple<double, int, int>, std::vector<std::tuple<double, int, int>>, std::greater<std::tuple<double, int, int>>> q;
	q.push(std::make_tuple(0, a, (1<<n)-1));
	while(!q.empty()) {
		double c = std::get<0>(q.top());
		int from = std::get<1>(q.top());
		int s = std::get<2>(q.top());
		q.pop();

		if ( from == b ) { ans = c; break; }
		for ( int i = 0; i < n; ++i ) {
			if ( s & (1<<i) ) {
				for ( int j = 0; j < dis_city.size(); ++j ) {
					if ( std::get<0>(dis_city[j]) == from ) {
						int to = std::get<1>(dis_city[j]);
						double f = c + std::get<2>(dis_city[j]) / num_basya[i];
						if ( cost[s ^ (1<<i)][to] > f ) {
							cost[s ^ (1<<i)][to] = f;
							q.push(std::make_tuple(f, to, s ^ (1<<i)));
						}
					}
				}
			}
		}
	}
	return ans;
}

int main(void)
{

	while(true) {
		dis_city.clear(); num_basya.clear();
		std::cin >> n >> m >> p >> a >> b;
		if ( n == 0 && m == 0 ) return 0;
		a--; b--;

		num_basya.resize(n);
		for ( auto &v: num_basya ) {
			std::cin >> v;
		}


		for ( int i = 0; i < p; ++i ) {
			int x, y, z;
			std::cin >> x;
			std::cin >> y;
			std::cin >> z;
			x--; y--;

			T t1(x,y,z), t2(y,x,z);
			dis_city.push_back(t1);
			dis_city.push_back(t2);
		}

		double ans = search();
		if ( ans > 65530 ) {
			std::cout << "Impossible" << std::endl;
		} else {
			printf("%.4f\n", ans);
		}
	}

	return 0;
}