Problem: An undirected graph is given. Each edge of the graph disappears with a constant probability. Calculate the probability with which the remained graph is connected.



Input

The first line contains three integers N (1 \leq N \leq 14), M (0 \leq M \leq 100) and P (0 \leq P \leq 100), separated by a single space. N is the number of the vertices and M is the number of the edges. P is the probability represented by a percentage.

The following M lines describe the edges. Each line contains two integers v_i and u_i (1 \leq u_i, v_i \leq N). (u_i, v_i) indicates the edge that connects the two vertices u_i and v_i.

Output

Output a line containing the probability with which the remained graph is connected. Your program may output an arbitrary number of digits after the decimal point. However, the absolute error should be 10^{-9} or less.

Examples

Input

3 3 50
1 2
2 3
3 1


Output

0.500000000000


Input

3 3 10
1 2
2 3
3 1


Output

0.972000000000


Input

4 5 50
1 2
2 3
3 4
4 1
1 3


Output

0.437500000000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0; i<(int)(n); ++i)

using namespace std;
int N, M;
double P;
int A[100];
int B[100];
int hit(int k) {
    return 1 << k;
}

const double None = 1e-100;

double prob(int s, int V);

// sが連結になる確率
double memo[1 << 14];
double calc(int s) {
    double& res = memo[s];
    if(res != None) return res;
    res = 1.0;
    int sub = s;
    do{
        //if(sub != s) printf("s = %d sub = %d prob = %f\n", s, sub, prob(sub, s));
        if(sub != s) res -= prob(sub, s);
        // do something here
        sub = (sub - 1) & s;
    } while(sub != s);
    //printf("calc(%d) -> %f\n", s, res);
    return res;
}

// V(v0) が s になる確率
//map<int, double> memo2[1 << 14];
double prob(int s, int V) {
    if(!(s >> 0 & 1)) return 0.0;

    //if(memo2[V].count(s)) return memo2[V][s];

    double res = calc(s);

    for(int i = 0; i < M; i++) {
        if(!(V & hit(A[i]))) continue;
        if(!(V & hit(B[i]))) continue;
        int fa = (s & hit(A[i]) ? 1 : 0);
        int fb = (s & hit(B[i]) ? 1 : 0);
        if(fa != fb) {
            res *= P;
        }
    }

    return res;
}

int main(){
    while(cin >> N >> M >> P && N > 0) {
        REP(i, 1 << N) memo[i] = None;
       // REP(i, 1 << N) memo2[i].clear();

        P /= 100.0;

        REP(i, M) cin >> A[i] >> B[i];
        REP(i, M) A[i] --;
        REP(i, M) B[i] --;

        printf("%.12f\n", calc((1 << N) - 1));
    }
    return 0;
}