You are given a simple undirected graph with n vertices, n is even. You are going to write a letter on each vertex. Each letter should be one of the first k letters of the Latin alphabet.

A path in the graph is called Hamiltonian if it visits each vertex exactly once. A string is called palindromic if it reads the same from left to right and from right to left. A path in the graph is called palindromic if the letters on the vertices in it spell a palindromic string without changing the order.

A string of length n is good if: 

  * each letter is one of the first k lowercase Latin letters; 
  * if you write the i-th letter of the string on the i-th vertex of the graph, there will exist a palindromic Hamiltonian path in the graph. 



Note that the path doesn't necesserily go through the vertices in order 1, 2, ..., n.

Count the number of good strings.

Input

The first line contains three integers n, m and k (2 ≤ n ≤ 12; n is even; 0 ≤ m ≤ (n ⋅ (n-1))/(2); 1 ≤ k ≤ 12) — the number of vertices in the graph, the number of edges in the graph and the number of first letters of the Latin alphabet that can be used.

Each of the next m lines contains two integers v and u (1 ≤ v, u ≤ n; v ≠ u) — the edges of the graph. The graph doesn't contain multiple edges and self-loops.

Output

Print a single integer — number of good strings.

Examples

Input


4 3 3
1 2
2 3
3 4


Output


9


Input


4 6 3
1 2
1 3
1 4
2 3
2 4
3 4


Output


21


Input


12 19 12
1 3
2 6
3 6
3 7
4 8
8 5
8 7
9 4
5 9
10 1
10 4
10 6
9 10
11 1
5 11
7 11
12 2
12 5
12 11


Output


456165084
/*
  Compete against Yourself.
  Author - Aryan (@aryanc403)
*/
/*
  Credits -
  Atcoder library - https://atcoder.github.io/ac-library/production/document_en/ (namespace atcoder)
  Github source code of library - https://github.com/atcoder/ac-library/tree/master/atcoder
*/

#ifdef ARYANC403
    #include <header.h>
#else
    #pragma GCC optimize ("Ofast")
    #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
    #pragma GCC optimize ("-ffloat-store")
    #include<bits/stdc++.h>
    #include <ext/pb_ds/assoc_container.hpp>
    #include <ext/pb_ds/tree_policy.hpp>
    #define dbg(args...) 42;
    #define endl "\n"
#endif

// y_combinator from @neal template https://codeforces.com/contest/1553/submission/123849801
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0200r0.html
template<class Fun> class y_combinator_result {
    Fun fun_;
public:
    template<class T> explicit y_combinator_result(T &&fun): fun_(std::forward<T>(fun)) {}
    template<class ...Args> decltype(auto) operator()(Args &&...args) { return fun_(std::ref(*this), std::forward<Args>(args)...); }
};
template<class Fun> decltype(auto) y_combinator(Fun &&fun) { return y_combinator_result<std::decay_t<Fun>>(std::forward<Fun>(fun)); }

using namespace std;
#define fo(i,n)   for(i=0;i<(n);++i)
#define repA(i,j,n)   for(i=(j);i<=(n);++i)
#define repD(i,j,n)   for(i=(j);i>=(n);--i)
#define all(x) begin(x), end(x)
#define sz(x) ((lli)(x).size())
#define pb push_back
#define mp make_pair
#define X first
#define Y second

typedef long long int lli;
typedef long double mytype;
typedef pair<lli,lli> ii;
typedef vector<ii> vii;
typedef vector<lli> vi;
template <class T>
using ordered_set =  __gnu_pbds::tree<T,__gnu_pbds::null_type,less<T>,__gnu_pbds::rb_tree_tag,__gnu_pbds::tree_order_statistics_node_update>;
// X.find_by_order(k) return kth element. 0 indexed.
// X.order_of_key(k) returns count of elements strictly less than k.

const auto start_time = std::chrono::high_resolution_clock::now();
void aryanc403()
{
#ifdef ARYANC403
auto end_time = std::chrono::high_resolution_clock::now();
std::chrono::duration<double> diff = end_time-start_time;
    cerr<<"Time Taken : "<<diff.count()<<"\n";
#endif
}

const lli INF = 0xFFFFFFFFFFFFFFFLL;
const lli SEED=chrono::steady_clock::now().time_since_epoch().count();
mt19937 rng(SEED);
inline lli rnd(lli l=0,lli r=INF)
{return uniform_int_distribution<lli>(l,r)(rng);}

class CMP
{public:
bool operator()(ii a , ii b) //For min priority_queue .
{    return ! ( a.X < b.X || ( a.X==b.X && a.Y <= b.Y ));   }};

void add( map<lli,lli> &m, lli x,lli cnt=1)
{
    auto jt=m.find(x);
    if(jt==m.end())         m.insert({x,cnt});
    else                    jt->Y+=cnt;
}

void del( map<lli,lli> &m, lli x,lli cnt=1)
{
    auto jt=m.find(x);
    if(jt->Y<=cnt)            m.erase(jt);
    else                      jt->Y-=cnt;
}

bool cmp(const ii &a,const ii &b)
{
    return a.X<b.X||(a.X==b.X&&a.Y<b.Y);
}

const lli mod = 1000000007L;
// const lli maxN = 1000000007L;
const int N=12;
const int maxN = (1LL<<N)*N*N;
bitset<maxN> vis,dp;
int getIdx[1<<N];
int e[N];
int n,m,k;
vii edges;

void preprocess(const lli col){
    shuffle(all(edges),rng);
    dp.reset();
    vis.reset();
    auto checkPath = y_combinator([&](const auto &run,int msk,int u,int v)->bool{
        if(u>v)
            swap(u,v);
        const int curMsk = (u*n+v)*(1<<n)+msk;
        if(dp[curMsk])
            return vis[curMsk];
        dp[curMsk]=1;
        if(msk==0)
            return vis[curMsk]=true;
        bool fl=false;
        int curi=msk&e[u];
        while(curi)
        {
            const int i=getIdx[curi&(-curi)];
            curi&=~(1<<i);
            int curj=msk&e[v];
            while(curj)
            {
                const int j=getIdx[curj&(-curj)];
                curj&=~(1<<j);
                if(i==j||((col>>(3*i))&7)!=((col>>(3*j))&7))
                    continue;
                fl=fl||run(msk^(1<<i)^(1<<j),i,j);
            }
        }
        return vis[curMsk]=fl;
    });
    for(const auto &[i,j]:edges)
        {
            if(((col>>(3*i))&7)!=((col>>(3*j))&7))
                continue;
            checkPath(((1<<n)-1)^(1<<i)^(1<<j),i,j);
        }
}

bool getAllPaths(const lli &col){
    shuffle(all(edges),rng);
    dp.reset();
    bool fl=false;
    auto checkPath = y_combinator([&](const auto &run,int msk,int u,int v)->void{
        if(fl)
            return;
        if(u>v)
            swap(u,v);
        const int curMsk = (u*n+v)*(1<<n)+msk;
        if(dp[curMsk]||!vis[curMsk])
            return;
        dp[curMsk]=1;
        if(msk==0){
            fl=true;
            return;
        }
        int curi=msk&e[u];
        while(curi)
        {
            const int i=getIdx[curi&(-curi)];
            curi&=~(1<<i);
            int curj=msk&e[v];
            while(curj)
            {
                const int j=getIdx[curj&(-curj)];
                curj&=~(1<<j);
                if(i==j||((col>>(3*i))&7)!=((col>>(3*j))&7))
                    continue;
                run(msk^(1<<i)^(1<<j),i,j);
            }
        }
    });
    for(const auto &[i,j]:edges)
        {
            if(fl)
                break;
            if(((col>>(3*i))&7)!=((col>>(3*j))&7))
                continue;
            checkPath(((1<<n)-1)^(1<<i)^(1<<j),i,j);
        }
    return fl;
}

lli getAllComb(){
    lli ans=0;
    lli cur=0;
    y_combinator([&](const auto &run,int bc,lli col,int s,bool fl,lli cnt)->void{
        if(col>k)
            return;
        if(fl)
            cnt*=(k-col+1);
        for(int j=s;j<n;++j){
            if((cur>>(3*j))&7)
                continue;
            cur|=col<<(3*j);
            if(bc>1)
            {
                run(bc-1,col,j+1,false,cnt);
                if(bc&1)
                    run(bc-1,col+1,0,true,cnt);
            } else {
                ans+=cnt*getAllPaths(cur);
            }
            cur&=~(7LL<<(3*j));
            if(fl)
                break;
        }
    })(n,1,0,true,1);
    return ans;
}

int main(void) {
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    // freopen("txt.in", "r", stdin);
    // freopen("txt.out", "w", stdout);
// cout<<std::fixed<<std::setprecision(35);
// cin>>T;while(T--)
{
    cin>>n>>m>>k;
    vi shuf(n);
    iota(all(shuf),0);
    shuffle(all(shuf),rng);
    dbg(shuf);
    for(int itr=0;itr<m;++itr){
        int u,v;
        cin>>u>>v;
        u--;v--;
        u=shuf[u];
        v=shuf[v];
        dbg(u,v);
        e[u]|=1<<v;
        e[v]|=1<<u;
        edges.pb({u,v});
    }
    memset(getIdx,-1,sizeof(getIdx));
    for(int i=0;i<n;++i)
        getIdx[1<<i]=i;
    preprocess(0);
    const lli ans=getAllComb();
    cout<<ans<<endl;
}   aryanc403();
    return 0;
}
