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 <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

#define EPS 1e-9
#define INF 1070000000LL
#define MOD 1000000007LL
#define fir first
#define foreach(it,X) for(__typeof((X).begin()) it=(X).begin();it!=(X).end();it++)
#define ite iterator
#define mp make_pair
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i=m;i<(n);i++)
#define pb push_back
#define sec second
#define sz(x) ((int)x.size())

using namespace std;

typedef istringstream iss;
typedef long long ll;
typedef pair<int,int> pi;
typedef stringstream sst;
typedef vector<int> vi;

int N,M;
double P;
int u[111],v[111];
double dp[1<<14];

int main(){
	cin.tie(0);
	ios_base::sync_with_stdio(0);
	
	cin>>N>>M>>P;
	P/=100;
	rep(i,M)cin>>u[i]>>v[i],u[i]--,v[i]--;
	
	rep2(mask,1,1<<N){
		
		if(__builtin_popcount(mask)==1){
			dp[mask]=1;
			continue;
		}
		
		dp[mask]=1;
		int par=N-1;
		while(!(mask>>par&1))par--;
		int sub=mask,e;
		
		while(1){
			sub=(sub-1)&mask;
			e=0;
			rep(i,M){
				if((sub>>u[i]&1) && !(sub>>v[i]&1) && (mask>>v[i]&1)
				|| (sub>>v[i]&1) && !(sub>>u[i]&1) && (mask>>u[i]&1))e++;
			}
			//cout<<mask<<" - "<<dp[sub]<<" * "<<pow(P,e)<<endl;
			dp[mask]-=dp[sub]*pow(P,e);
			if(sub==(1<<par))break;
		}
		
		//cout<<mask<<" "<<dp[mask]<<endl;
	}
	//cout<<setprecision(16)<<dp[(1<<N)-1]<<endl;
	printf("%.16f\n",dp[(1<<N)-1]);
}