#include <bits/stdc++.h>
using namespace std;
long long n, hf;
bool g[50][50];
inline void addedge(long long from, long long to) {
  g[from][to] = g[to][from] = true;
}
long long makepair[50];
long long chains[50][2], belong[50];
long long p[50];
bool check() {
  for (long long i = 1; i <= hf; i++) p[i] = i;
  do {
    for (long long i = 1; i < hf; i++) {
      if (g[chains[p[i]][0]][chains[p[i + 1]][0]] &&
          g[chains[p[i]][1]][chains[p[i + 1]][1]])
        ;
      else if (g[chains[p[i]][0]][chains[p[i + 1]][1]] &&
               g[chains[p[i]][1]][chains[p[i + 1]][0]])
        ;
      else
        goto no;
    }
    if (!g[chains[p[hf]][0]][chains[p[hf]][1]]) continue;
    return true;
  no:;
  } while (next_permutation(p + 1, p + hf + 1));
  return false;
}
vector<vector<long long> > colors;
vector<long long> nowcolor;
void color(long long u, long long now) {
  if (u == hf + 1) {
    nowcolor[0] = now - 1;
    colors.push_back(nowcolor);
    return;
  }
  for (long long i = 1; i <= now; i++) {
    nowcolor[u] = i;
    color(u + 1, max(now, i + 1));
  }
}
set<pair<long long, long long> > anss;
void dfs(long long u, long long now) {
  while (u <= n && makepair[u]) u++;
  if (u == n + 1) {
    bool ok = check();
    if (!ok) return;
    for (auto vec : colors) {
      long long Hash = 0;
      for (long long i = 1; i <= n; i++) Hash = Hash * 6 + (vec[belong[i]] - 1);
      anss.insert({Hash, vec[0]});
    }
    return;
  }
  for (long long i = u + 1; i <= n; i++)
    if (!makepair[i]) {
      makepair[u] = i, makepair[i] = u;
      chains[now][0] = u, chains[now][1] = i;
      belong[u] = belong[i] = now;
      dfs(u + 1, now + 1);
      makepair[u] = makepair[i] = 0;
    }
}
long long fac[50];
inline void InitFac(long long n) {
  fac[0] = 1;
  for (long long i = 1; i <= n; i++) fac[i] = fac[i - 1] * i;
}
inline long long A(long long n, long long m) {
  return n < m ? 0 : fac[n] / fac[n - m];
}
signed main() {
  memset(g, false, sizeof(g));
  InitFac(15);
  long long m, k;
  scanf("%lld %lld %lld", &n, &m, &k);
  hf = n >> 1;
  while (m--) {
    long long u, v;
    scanf("%lld %lld", &u, &v);
    addedge(u, v);
  }
  memset(makepair, 0, sizeof(makepair));
  nowcolor.resize(50);
  color(1, 1);
  dfs(1, 1);
  long long ans = 0;
  for (auto x : anss) {
    long long cnt = x.second;
    ans += A(k, cnt);
  }
  printf("%lld\n", ans);
  return 0;
}

### Prompt

In Cpp, your task is to solve the following problem:

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

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
long long n, hf;
bool g[50][50];
inline void addedge(long long from, long long to) {
  g[from][to] = g[to][from] = true;
}
long long makepair[50];
long long chains[50][2], belong[50];
long long p[50];
bool check() {
  for (long long i = 1; i <= hf; i++) p[i] = i;
  do {
    for (long long i = 1; i < hf; i++) {
      if (g[chains[p[i]][0]][chains[p[i + 1]][0]] &&
          g[chains[p[i]][1]][chains[p[i + 1]][1]])
        ;
      else if (g[chains[p[i]][0]][chains[p[i + 1]][1]] &&
               g[chains[p[i]][1]][chains[p[i + 1]][0]])
        ;
      else
        goto no;
    }
    if (!g[chains[p[hf]][0]][chains[p[hf]][1]]) continue;
    return true;
  no:;
  } while (next_permutation(p + 1, p + hf + 1));
  return false;
}
vector<vector<long long> > colors;
vector<long long> nowcolor;
void color(long long u, long long now) {
  if (u == hf + 1) {
    nowcolor[0] = now - 1;
    colors.push_back(nowcolor);
    return;
  }
  for (long long i = 1; i <= now; i++) {
    nowcolor[u] = i;
    color(u + 1, max(now, i + 1));
  }
}
set<pair<long long, long long> > anss;
void dfs(long long u, long long now) {
  while (u <= n && makepair[u]) u++;
  if (u == n + 1) {
    bool ok = check();
    if (!ok) return;
    for (auto vec : colors) {
      long long Hash = 0;
      for (long long i = 1; i <= n; i++) Hash = Hash * 6 + (vec[belong[i]] - 1);
      anss.insert({Hash, vec[0]});
    }
    return;
  }
  for (long long i = u + 1; i <= n; i++)
    if (!makepair[i]) {
      makepair[u] = i, makepair[i] = u;
      chains[now][0] = u, chains[now][1] = i;
      belong[u] = belong[i] = now;
      dfs(u + 1, now + 1);
      makepair[u] = makepair[i] = 0;
    }
}
long long fac[50];
inline void InitFac(long long n) {
  fac[0] = 1;
  for (long long i = 1; i <= n; i++) fac[i] = fac[i - 1] * i;
}
inline long long A(long long n, long long m) {
  return n < m ? 0 : fac[n] / fac[n - m];
}
signed main() {
  memset(g, false, sizeof(g));
  InitFac(15);
  long long m, k;
  scanf("%lld %lld %lld", &n, &m, &k);
  hf = n >> 1;
  while (m--) {
    long long u, v;
    scanf("%lld %lld", &u, &v);
    addedge(u, v);
  }
  memset(makepair, 0, sizeof(makepair));
  nowcolor.resize(50);
  color(1, 1);
  dfs(1, 1);
  long long ans = 0;
  for (auto x : anss) {
    long long cnt = x.second;
    ans += A(k, cnt);
  }
  printf("%lld\n", ans);
  return 0;
}

```