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
#include <bits/stdc++.h>
const int MAX_N = 12;
bool M[MAX_N + 3][MAX_N + 3];
int n, m, k;
bool is_bit(int mask, int pos) { return (mask & (1 << pos)) != 0; }
std::vector<long long> states;
std::unordered_map<long long, int> longest;
std::unordered_map<long long, int> longest_cnt;
std::unordered_map<long long, int> buckets_cnt;
std::unordered_map<long long, bool> dp;
long long pot[20];
long long potK[20];
int cnt[6];
long long choose[15][15];
long long f[15];
void gen_states(long long state, int next, int buckets) {
  if (next == n) {
    for (int i = 0; i < 6; i++) cnt[i] = 0;
    for (int i = 0; i < n; i++) {
      cnt[(state % pot[i + 1]) / pot[i]]++;
    }
    for (int i = 0; i < n; i++)
      if (cnt[i] % 2 == 1) return;
    states.push_back(state);
    int x = -1;
    int y = 0;
    for (int i = 5; i >= 0; i--) {
      if (cnt[i] > x) {
        x = cnt[i];
        y = 1;
      } else if (cnt[i] == x)
        y++;
    }
    longest[state] = x;
    longest_cnt[state] = y;
    buckets_cnt[state] = buckets + 1;
    return;
  }
  for (long long i = 0; i <= std::min(5, buckets + 1); i++)
    gen_states(state + (pot[next] * i), next + 1,
               std::max((long long)(buckets), i));
}
bool cmp_states(const long long &A, const long long &B) {
  if (longest[A] < longest[B])
    return true;
  else if (longest[A] == longest[B])
    return longest_cnt[A] < longest_cnt[B];
  return false;
}
void input() {
  std::cin >> n >> m >> k;
  for (int i = 0; i < m; i++) {
    int x, y;
    std::cin >> x >> y;
    x--;
    y--;
    M[x][y] = M[y][x] = true;
  }
}
const int MAX_MASK = (1 << 6);
bool dpI[MAX_MASK + 3][6];
std::pair<int, int> v[6];
bool base_dp(long long state) {
  for (int i = 0; i < 6; i++) v[i] = std::make_pair(-1, -1);
  for (int i = 0; i < n; i++) {
    int c = (state % pot[i + 1]) / pot[i];
    if (v[c].first == -1)
      v[c].first = i;
    else
      v[c].second = i;
  }
  int colors = n / 2;
  for (int i = 0; i < colors; i++) {
    dpI[(1 << i)][i] = M[v[i].first][v[i].second];
  }
  for (int mask = 1; mask < (1 << colors); mask++) {
    if (__builtin_popcount(mask) <= 1) continue;
    for (int i = 0; i < colors; i++) {
      dpI[mask][i] = false;
      if (is_bit(mask, i)) {
        int mask1 = mask ^ (1 << i);
        for (int j = 0; j < colors && !dpI[mask][i]; j++) {
          if (is_bit(mask1, j) && dpI[mask1][j]) {
            if ((M[v[j].first][v[i].first] && M[v[j].second][v[i].second]) ||
                (M[v[j].first][v[i].second] && M[v[j].second][v[i].first]))
              dpI[mask][i] = true;
          }
        }
      }
    }
  }
  for (int i = 0; i < colors; i++)
    if (dpI[(1 << colors) - 1][i]) return true;
  return false;
}
std::vector<int> w[10];
long long sum[10];
long long sum_bigger[10];
long long max[20];
bool calc_dp(long long state) {
  for (int i = 0; i < (n / 2); i++) {
    w[i].clear();
    sum_bigger[i] = 0;
    sum[i] = 0;
  }
  long long max_found = -1;
  for (int i = 0; i < n; i++) {
    max[i] = max_found;
    long long x = (state % pot[i + 1]) / pot[i];
    max_found = std::max(max_found, x);
    sum[x] += pot[i];
    w[x].push_back(i);
  }
  sum_bigger[5] = sum_bigger[6] = 0;
  for (int i = 4; i >= 0; i--) sum_bigger[i] = sum_bigger[i + 1] + sum[i + 1];
  for (int i = 0; i < (n / 2); i++) {
    if (w[i].size() >= 4) {
      int x = w[i][0];
      for (int j = 1; j < w[i].size(); j++) {
        int y = w[i][j];
        int u = max[w[i][1]];
        if (j == 1) u = max[w[i][2]];
        long long statep =
            state + sum_bigger[u] + (sum[i] - pot[x] - pot[y]) * ((u + 1) - i);
        if (dp[statep]) return true;
      }
    }
  }
  return false;
}
void solve() {
  input();
  pot[0] = 1;
  for (int i = 1; i <= 19; i++) pot[i] = (pot[i - 1] * (long long)(6));
  f[0] = 1;
  for (long long i = 1; i <= 13; i++) f[i] = f[i - 1] * i;
  choose[0][0] = 1;
  for (int i = 1; i <= 13; i++) {
    choose[i][0] = 1;
    for (int j = 1; j <= i; j++)
      choose[i][j] = choose[i - 1][j] + choose[i - 1][j - 1];
  }
  gen_states(0, 0, -1);
  std::sort(states.begin(), states.end(), cmp_states);
  for (auto s : states) {
    if (longest[s] == 2)
      dp[s] = base_dp(s);
    else
      dp[s] = calc_dp(s);
  }
  long long res = 0;
  for (auto s : states)
    if (dp[s]) res += choose[k][buckets_cnt[s]] * f[buckets_cnt[s]];
  std::cout << res << "\n";
}
int main() {
  std::ios_base::sync_with_stdio(0);
  std::cin.tie(NULL);
  solve();
}
