Tax

Find the shortest path from S to D in a weighted undirected graph, then report it again after each tax rise adds p to every edge.

Medium5Shortest pathGraphGreedySortingNo attempts yetTime limit2sMemory limit256 MB

Problem

Jueon studied economics and became a traveling merchant. He trades between two cities and wants to take the route whose total toll is smallest. The cities are joined by two-way roads, and every road charges a toll.

The government announced a tax increase. Raising the tax in one step would cause trouble, so the government raises it in several steps. When the tax rises by AA, the toll on every road rises by AA as well. A tax rise can change the total toll Jueon has to pay.

Help Jueon. Compute the minimum toll before any tax rise, and the minimum toll after each rise.

Input

The first line has three integers NN (2N10002 \le N \le 1000), MM (1M300001 \le M \le 30000) and KK (0K300000 \le K \le 30000): the number of cities, the number of roads, and the number of tax rises, in that order.

The second line has two integers SS and DD (1S,DN1 \le S, D \le N, SDS \ne D): the number of the starting city and the number of the destination city. Cities are numbered from 1.

Each of the next MM lines describes one road with three integers aa, bb (1a<bN1 \le a < b \le N) and ww (1w10001 \le w \le 1000), meaning that city aa and city bb are joined by a road whose toll is ww. Several roads may join the same pair of cities.

Each of the next KK lines has one integer pp (1p101 \le p \le 10): the first, second, ..., KKth tax rise, in that order.

The input never asks about a case where DD cannot be reached from SS.

Output

Print the minimum toll before any tax rise on the first line.

On each of the next KK lines, print the minimum toll right after the first, second, ..., KKth tax rise, in that order.

Hint

Before the tax rises

After the first tax rise

After the second tax rise