#include <iostream>
#include <algorithm>
#include <queue>
#include <vector>
#include <cstdio>
using namespace std;

struct NODE{
	int to,cost;
	NODE(int to,int cost) : to(to) , cost(cost) {}
	NODE(){}
};
bool operator < (const NODE &a,const NODE &b){
	return a.cost > b.cost;
}
int done[110] = {};
double dp[110] = {} , rdp[110] = {};

vector<NODE> g[100];
int n,m,p;

double dfs(int x,int cst){
	if( done[x] != cst ) return 0;
	if( x == n - 1 ) return 1;
	if( dp[x] != -1 ) return dp[x];
	double ans = 0;
	for(int i = 0 ; i < g[x].size() ; i++)
		ans += dfs(g[x][i].to,cst+g[x][i].cost);
	return dp[x] = ans;
}

double rdfs(int x,int cst){
	if( done[n-1] - done[x] != cst ) return 0;
	if( x == 0 ) return 1;
	if( rdp[x] != -1 ) return rdp[x];
	double ans = 0;
	for(int i = 0 ; i < g[x].size() ; i++)
		ans += rdfs(g[x][i].to,cst+g[x][i].cost);
	return rdp[x] = ans;
}
int main(){
	while(cin >> n >> m >> p && (n||m||p) ){
		for(int i = 0 ; i < n ; i++) g[i].clear();
		for(int i = 0 ; i < m ; i++){
			int a,b,c;
			cin >> a >> b >> c;
			g[a].push_back( NODE(b,c) );
			g[b].push_back( NODE(a,c) );
		}
		for(int i = 0 ; i < 110 ; i++) done[i] = -1;
		for(int i = 0 ; i < 110 ; i++)
				dp[i] = rdp[i] = -1;
		priority_queue<NODE> Q;
		Q.push(NODE(0,0));
		while(Q.size()){
			NODE q = Q.top(); Q.pop();
			if( done[q.to] != -1 ) continue;
			else done[q.to] = q.cost;
			for(int i = 0 ; i < g[q.to].size() ; i++)
				Q.push(NODE(g[q.to][i].to,q.cost+g[q.to][i].cost));
		}
		double all = dfs(0,0);
		//cout << all << endl;
		for(int i = 0 ; i < p ; i++){
			int a;
			cin >> a;
			if( done[a] == -1 ){
				printf("%.8lf\n",0.0);
			}else{
				double A = dfs(a,done[a]);
				double B = rdfs(a,done[n-1] - done[a]);
				printf("%.8lf\n",1.0 * A*B / all);
			}
		}
		cout << endl;
	}
	
}