Ciel and Random Walk

All submissions for this problem are available.
Today, Ciel's restaurant is closed.
Ciel is bored, so she decides to take a walk randomly.
This town has N intersections and M one way roads.
The ith road connects from the A_{i}th intersection to the B_{i}th intersection.
Ciel is in the 1st intersection now, and Ciel's house is in the Nth intersection.
If Ciel is in the ith intersection, she will take a walk as follows:
 If i = N, her walk is ended.
 Otherwise, she chooses an integer k such that A_{k} = i uniformly randomly, she walks along the kth road.
On the way, S intersections have beautiful flowers.
Let the F_{1}th intersection, the F_{2}th intersection, ..., and the F_{S}th intersection have beautiful flowers.
Can you tell the probability that Ciel last sees the flowers in the F_{i}th intersection?
That is to say, can you tell the probability that she visits the F_{i}th intersection, then she goes to Nth intersection without visiting other intersections having beautiful flowers?
Input
The first line contains 3 integers N, M and S.
Then, next line has S integers F_{1}, F_{2}, ..., F_{S}.
Next M lines have 2 integers each, A_{i} and B_{i}.
Output
An output should contain S lines.
In the ith line, print the probability that Ciel last sees beautiful flowers at the F_{i}th intersection.
These values must have an absolute error no more than 10^{6}.
Constraints
1 ≤ S < N ≤ 30
1 ≤ F_{1} < F_{2} < ... < F_{S} < N
A_{i} ≠ B_{i}
If i ≠ j and A_{i} = A_{j}, then B_{i} ≠ B_{j}
For each 1 ≤ i < N, Ciel can go from the ith intersection to the Nth intersection, directly or indirectly.
Sample Input 1
4 6 3 1 2 3 1 2 2 1 1 3 3 1 2 4 3 4
Sample Output 1
0 0.5 0.5
Sample Input 2
4 6 1 2 1 2 2 1 1 3 3 1 2 4 3 4
Sample Output 2
0.6666666666667
Sample Input 3
2 1 1 1 1 2
Sample Output 3
1
Notes
The sum of output values can be less than 1, because Ciel may go back to her house without seeing beautiful flowers.
Author:  laycurse 
Tester:  shangjingbo 
Editorial  http://discuss.codechef.com/problems/CIELWALK 
Tags  cook17, hard, laycurse 
Date Added:  24112011 
Time Limit:  0.345763 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.5, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 