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>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
template <class T>
using pq = priority_queue<T>;
template <class T>
using pqg = priority_queue<T, vector<T>, greater<T>>;
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char* x) { cerr << '\"' << x << '\"'; }
void __print(const string& x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V>& x) {
  cerr << '{';
  __print(x.first);
  cerr << ", ";
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T& x) {
  int first = 0;
  cerr << '{';
  for (auto& i : x) cerr << (first++ ? ", " : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const int MOD = 1000000007;
const char nl = '\n';
const int MX = 13;
int N, M, K;
long long ans = 0;
vector<int> color, match;
vector<int> cc[MX];
int nc = 0;
set<vector<int>> okMatches;
long long numWays[MX];
bool graph[MX][MX];
bool goMatch(int p) {
  if (p == N) {
    if (okMatches.count(match)) {
      ans += numWays[nc];
      return true;
    }
    return false;
  }
  if (match[p] != -1) {
    return goMatch(p + 1);
  }
  for (auto& a : cc[color[p]]) {
    if (a == p || match[a] != -1) continue;
    match[a] = p;
    match[p] = a;
    if (goMatch(p + 1)) return true;
    match[p] = -1;
    match[a] = -1;
  }
  return false;
}
void goColor(int p) {
  if (p == N) {
    for (int i = 0; i < (nc); i++)
      if ((int)(cc[i]).size() % 2) return;
    match = vector<int>(N, -1);
    goMatch(0);
    return;
  }
  int onc = nc;
  for (int i = 0; i < (onc + 1); i++) {
    ckmax(nc, i + 1);
    color[p] = i;
    cc[i].push_back(p);
    goColor(p + 1);
    cc[i].pop_back();
  }
  nc = onc;
}
void initMatch(int p) {
  if (p == N) {
    vector<vector<int>> pairs;
    for (int i = 0; i < (N); i++) {
      if (i < match[i]) {
        pairs.push_back({i, match[i]});
      }
    }
    bool ok[N / 2][N / 2];
    for (int i = 0; i < (N / 2); i++)
      for (int j = 0; j < (N / 2); j++) ok[i][j] = false;
    for (int i = 0; i < (N / 2); i++) {
      for (int j = 0; j < (N / 2); j++) {
        for (int a = 0; a < (2); a++) {
          for (int b = 0; b < (2); b++) {
            if (graph[pairs[i][a]][pairs[j][b]] &&
                graph[pairs[i][1 - a]][pairs[j][1 - b]]) {
              ok[i][j] = true;
            }
            if (i == j && graph[pairs[i][a]][pairs[j][b]]) {
              ok[i][j] = true;
            }
          }
        }
      }
    }
    vector<int> perm;
    for (int i = 0; i < ((int)(pairs).size()); i++) perm.push_back(i);
    do {
      bool val = true;
      for (int i = 0; i < (N / 2 - 1); i++)
        if (!ok[perm[i]][perm[i + 1]]) val = false;
      if (!ok[perm[0]][perm[0]]) val = false;
      if (val) {
        okMatches.insert(match);
        return;
      }
    } while (next_permutation(perm.begin(), perm.end()));
    return;
  }
  if (match[p] != -1) {
    initMatch(p + 1);
    return;
  }
  for (int a = p + 1; a < (N); a++) {
    if (a == p || match[a] != -1) continue;
    match[a] = p;
    match[p] = a;
    initMatch(p + 1);
    match[p] = -1;
    match[a] = -1;
  }
}
void solve() {
  cin >> N >> M >> K;
  numWays[0] = 1;
  for (int i = 1; i < (MX); i++) numWays[i] = numWays[i - 1] * (K - i + 1);
  for (int i = 0; i < (M); i++) {
    int X, Y;
    cin >> X >> Y;
    X--;
    Y--;
    graph[X][Y] = true;
    graph[Y][X] = true;
  }
  match = vector<int>(N, -1);
  color = vector<int>(N);
  initMatch(0);
  goColor(0);
  cout << ans << nl;
}
int main() {
  cin.tie(0)->sync_with_stdio(0);
  cin.exceptions(cin.failbit);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
