using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){
		
		double Inf = 1e9;
		while(true){
			var d = ria();
			N = d[0]; M = d[1]; P = d[2]; A = d[3] - 1; B = d[4] - 1;
			if(N == 0) break;
			T = ria();
			X = new int[P];
			Y = new int[P];
			Z = new int[P];
			for(int i=0;i<P;i++){
				d = ria();
				X[i] = d[0] - 1;
				Y[i] = d[1] - 1;
				Z[i] = d[2];
			}
			List<int>[] E = new List<int>[M];
			for(int i=0;i<M;i++) E[i] = new List<int>();
			for(int i=0;i<P;i++){
				E[X[i]].Add(i);
				E[Y[i]].Add(i);
			}
			
			double[][] min = new double[M][];
			bool[][] used = new bool[M][];
			for(int i=0;i<M;i++){
				min[i] = new double[1<<N];
				for(int j=0;j<1<<N;j++){
					min[i][j] = Inf;
				}
				used[i] = new bool[1<<N];
			}
			
			var SH = new SkewHeap<Pair>();
			SH.Push(new Pair((A<<10)+(1<<N)-1,0.0));
			min[A][(1<<N)-1] = 0.0;
			
			while(SH.Count>0){
				var p = SH.Top; SH.Pop();
				int now = p.Pos/1024;
				int ticket = (p.Pos)%1024;
				if(used[now][ticket]) continue;
				used[now][ticket] = true;
				min[now][ticket] = p.Cost;
				
				foreach(var e in E[now]){
					int to = X[e] == now ? Y[e] : X[e];
					for(int i=0;i<N;i++){
						if(((ticket >> i) & 1) == 0) continue;
						int nticket = ticket ^ (1<<i);
						double ncost = min[now][ticket] + Z[e]/(double) T[i];
						if(min[to][nticket] > ncost){
							min[to][nticket] = ncost;
							SH.Push(new Pair((to<<10) + nticket,min[to][nticket]));
						}
					}
				}
			}
			
			double res = Inf;
			for(int i=0;i<(1<<N);i++){
				res = Math.Min(res,min[B][i]);
			}
			Console.WriteLine(res == Inf ? "Impossible" : res.ToString());
		}
		
		
		
	}
	int N,M,P,A,B;
	int[] T;
	int[] X,Y,Z;

	public Sol(){
		
	}

	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(char sep=' '){return Console.ReadLine().Split(sep);}
	static int[] ria(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>int.Parse(e));}
	static long[] rla(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>long.Parse(e));}
	static double[] rda(char sep=' '){return Array.ConvertAll(Console.ReadLine().Split(sep),e=>double.Parse(e));}
}

class Pair : IComparable<Pair> {
	public int Pos;
	public double Cost;
	public Pair(int p, double c) {
		Pos = p; Cost = c;
	}
	public int CompareTo(Pair t) {
		//return this.Cost > t.Cost ? -1 : this.Cost < t.Cost ? 1 : 0;
		return this.Cost > t.Cost ? 1 : this.Cost < t.Cost ? -1 : 0;
	}
}


class SkewHeap<T> where T:IComparable<T>{
	public int Count{
		get{return cnt;}
		private set{cnt=value;}
	}
	
	public SkewHeap(){
		root=null;
		this.Count=0;
	}
	
	public void Push(T v){
		NodeSH<T> p=new NodeSH<T>(v);
		root=NodeSH<T>.Meld(root,p);
		this.Count++;
	}
	
	public void Pop(){
		if(root==null)return;
		root=NodeSH<T>.Meld(root.L,root.R);
		this.Count--;
	}
	
	public T Top{
		get{return root.Val;}
	}
	
	int cnt;
	NodeSH<T> root;
	
	class NodeSH<S> where S : IComparable<S> {
		public NodeSH<S> L, R;
		public S Val;

		public NodeSH(S v){
			Val = v;
			L = null; R = null;
		}
		public static NodeSH<S> Meld(NodeSH<S> a, NodeSH<S> b){
			if(a == null)return b;
			if (b == null) return a;
			if (a.Val.CompareTo(b.Val) > 0) swap(ref a, ref b);
			a.R = Meld(a.R, b);
			swap(ref a.L, ref a.R);
			return a;
		}

		static void swap<U>(ref U x, ref U y) {
			U t = x; x = y; y = t;
		}
	}
}

Measured memory_bytes: 13572