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 <complex>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <sstream>
#include <vector>
using namespace std;

#define REP2(i, m, n) for(int i = (int)(m); i < (int)(n); i++)
#define REP(i, n) REP2(i, 0, n)
#define ALL(c) (c).begin(), (c).end()
#define FOREACH(i, c) for(auto i = (c).begin(); i != (c).end(); ++i)
#define BIT(n, m) (((n) >> (m)) & 1)

typedef long long ll;
typedef pair<int, int> PI;

const ll inf = 1e15;
const ll mod = 1000 * 1000 * 1000 + 7;
const double eps = 1e-9;

template <typename S, typename T> ostream &operator<<(ostream &out, const pair<S, T> &p) {
  out << "(" << p.first << ", " << p.second << ")";
  return out;
}

template <typename T> ostream &operator<<(ostream &out, const vector<T> &v) {
  out << "[";
  REP(i, v.size()){
    if (i > 0) out << ", ";
    out << v[i];
  }
  out << "]";
  return out;
}

double memo[1 << 20];
double prob;
double rec(int mask, const vector<vector<int> > &G){
  if (mask == 0){
    return 1;
  } else if (memo[mask] > -eps){
    return memo[mask];
  } else {
    double &res = memo[mask] = 1.0;
    for (int submask = mask; submask > 0;){
      submask = (submask - 1) & mask;
      double p = 1.0;
      // cout << submask << " " << mask << endl;
      REP(i, G.size()) if ((submask & (1 << i)) || i + 1 == int(G.size())){
        REP(j, G.size()) if ((mask ^ submask) & (1 << j)){
          if (G[i][j]) p *= prob;
          // cout <<"POYO: " <<  i << " " << j << " " << mask << " " << submask << endl;
        }
      }
      // cout << mask << " "<< submask << " " << p << " " << rec(submask, G) << " " << endl;
      // cout << p << endl;
      res -= p * rec(submask, G);
      // cout << res << endl;
    }
    // cout << mask << " " << res << endl;
    return res;
  }
}


int main(){
  int N, M;
  double P;
  while (cin >> N >> M >> P){
    vector<vector<int> > G(N, vector<int>(N));
    REP(i, M){
      int a, b;
      cin >> a >> b; a--, b--;
      G[a][b] = G[b][a] = 1;
    }
    memset(memo, 0xff, sizeof(memo));
    prob = P * 0.01;
    cout << fixed << setprecision(20) << rec((1 << (N - 1)) - 1, G) << endl;
  }
  return 0;
}