Once upon a time, there was a traveler.
He plans to travel using stagecoaches (horse wagons). His starting point and destination are fixed, but he cannot decide his route on his own. Your job in this problem is to write a program that determines the route for him.
There are several cities in the country and a road network connecting them. If there is a road between two cities, one can travel by stagecoach from one of them to the other. A coach ticket is needed for a coach ride, and the number of horses is written on each ticket. Of course, with more horses the coach runs faster.
At the starting point, the traveler has a number of coach tickets. Considering these tickets together with the road network, you should find the best route that takes him to the destination in the shortest time. How the tickets are used must also be taken into account.
The following conditions are assumed.
The input consists of multiple datasets, each in the following format. The last dataset is followed by a line containing five zeros separated by spaces.
n m p a b
t1 t2 ... tn
x1 y1 z1
x2 y2 z2
...
xp yp zp
Every input item in a dataset is a non-negative integer. If a line contains two or more items, they are separated by a space.
The second line gives the ticket details. $t_i$ is the number of horses written on the $i$-th ticket ($1 \le i \le n$), with $1 \le t_i \le 10$.
The next $p$ lines give the road details. The $i$-th road connects cities $x_i$ and $y_i$ and has distance $z_i$ ($1 \le i \le p$), with $1 \le z_i \le 100$.
No two roads connect the same pair of cities, and no road connects a city to itself. Each road can be traveled in both directions.
For each dataset in the input, output one line as specified below. An output line must not contain any extra characters such as spaces.
If the traveler can reach the destination, output the time needed for the best route (a route that takes the shortest time), rounded to exactly three digits after the decimal point (for example, 30.000 or 3.667). The answer is always a rational number that never lands exactly on a rounding boundary, so its value rounded to three decimals is uniquely determined.
If the traveler cannot reach the destination, output the string Impossible. The destination is unreachable either when there is no route leading to it, or when the number of tickets is not sufficient. Note that the first letter of Impossible is uppercase while the remaining letters are lowercase.