#include <bits/stdc++.h>
using namespace std;
const int maxn = 14;
int n, m, K, lnk[maxn], f[1 << maxn][maxn], G[maxn][maxn], cnt[maxn], p[maxn];
long long ans, coef[maxn];
map<int, bool> mp;
int main() {
  scanf("%d %d %d", &n, &m, &K);
  for (int i = 1; i <= K; i++) {
    coef[i] = 1;
    for (int j = K; j >= K - i + 1; j--) coef[i] *= j;
  }
  while (m--) {
    int u, v;
    scanf("%d %d", &u, &v);
    G[u][v] = G[v][u] = 1;
  }
  auto chk = [&]() {
    int h = 0;
    vector<pair<int, int>> V;
    for (int i = 1; i <= n; i++)
      if (lnk[i] > i) {
        V.emplace_back(i, lnk[i]);
        h = h * 12 + lnk[i] - 1;
      }
    if (mp.count(h)) return mp[h];
    for (int i = 0; i < 1 << V.size(); i++) {
      for (int j = 0; j < V.size(); j++) f[i][j] = 0;
    }
    for (int i = 0; i < V.size(); i++) {
      if (G[V[i].first][V[i].second]) f[1 << i][i] = 1;
    }
    for (int i = 0; i < 1 << V.size(); i++) {
      for (int j = 0; j < V.size(); j++)
        if (f[i][j]) {
          int u = V[j].first, v = V[j].second;
          for (int k = 0; k < V.size(); k++)
            if (!(i >> k & 1)) {
              if (G[u][V[k].first] && G[v][V[k].second]) f[i | (1 << k)][k] = 1;
              if (G[u][V[k].second] && G[v][V[k].first]) f[i | (1 << k)][k] = 1;
            }
        }
    }
    for (int i = 0; i < V.size(); i++) {
      if (f[(1 << V.size()) - 1][i]) return mp[h] = true;
    }
    return mp[h] = false;
  };
  function<bool(int)> dfs = [&](int v) {
    if (v >= n) return chk();
    if (lnk[v]) return dfs(v + 1);
    for (int i = v + 1; i <= n; i++)
      if (!lnk[i] && p[i] == p[v]) {
        lnk[i] = v, lnk[v] = i;
        if (dfs(v + 1)) return true;
        lnk[i] = lnk[v] = 0;
      }
    return false;
  };
  function<void()> solve = [&]() {
    fill(cnt + 1, cnt + K + 1, 0);
    for (int i = 1; i <= n; i++) cnt[p[i]]++, lnk[i] = 0;
    for (int i = 1; i <= K; i++)
      if (cnt[i] & 1) return;
    if (dfs(1)) ans += coef[*max_element(p + 1, p + n + 1)];
  };
  function<void(int)> _enum = [&](int pos) {
    if (pos > n) {
      solve();
      return;
    }
    int mx = pos == 1 ? 0 : *max_element(p + 1, p + pos);
    for (int i = 1; i <= min(K, mx + 1); i++) {
      p[pos] = i, _enum(pos + 1);
    }
  };
  _enum(1), printf("%lld\n", ans);
  return 0;
}
