#include <bits/stdc++.h>
using namespace std;
long long n, m, k, g[15][15], vis[15], ss[15], ans, fac[15];
long long path[20000][15], cnt, tot, co[15], p[10];
set<vector<vector<long long>>> s;
vector<vector<long long>> cev;
vector<long long> vec, pos[15];
long long read() {
  long long res = 0, f = 1;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') f = -1;
  } while (!isdigit(ch));
  do {
    res = res * 10 + ch - '0';
    ch = getchar();
  } while (isdigit(ch));
  return res * f;
}
void check() {
  memset(co, 0, sizeof(co));
  cnt = 0;
  for (long long i = (1); i <= (n); ++i)
    if (!co[i]) p[++cnt] = i, co[i] = 1, co[vis[i]] = 1;
  do {
    long long fl = 1;
    for (long long S = (0); S <= (1 << ((n / 2) - 1)); ++S) {
      long long p1 = p[1], p2 = vis[p[1]];
      fl = 1;
      if (!g[p1][p2]) {
        fl = 0;
        break;
      }
      if (S & 1) swap(p1, p2);
      for (long long i = (2); i <= (cnt); ++i)
        if ((1 << (i - 1)) & S) {
          if (g[p1][p[i]] && g[p2][vis[p[i]]])
            p1 = p[i], p2 = vis[p[i]];
          else {
            fl = 0;
            break;
          }
        } else {
          if (g[p1][vis[p[i]]] && g[p2][p[i]])
            p1 = vis[p[i]], p2 = p[i];
          else {
            fl = 0;
            break;
          }
        }
      if (fl) {
        tot++;
        for (long long i = (1); i <= (n); ++i) path[tot][i] = vis[i];
        break;
      }
    }
    if (fl) break;
  } while (next_permutation(p + 1, p + cnt + 1));
}
void dfs(long long x) {
  if (x > n) return check();
  if (vis[x]) return dfs(x + 1);
  for (long long i = (x + 1); i <= (n); ++i)
    if (!vis[i]) {
      vis[x] = i;
      vis[i] = x;
      dfs(x + 1);
      vis[i] = vis[x] = 0;
    }
}
void dfs2(long long id, long long x, long long mx) {
  if (x > cnt) {
    cev.clear();
    for (long long i = (1); i <= (mx); ++i) {
      vec.clear();
      for (long long ps : pos[i])
        vec.push_back(ps), vec.push_back(path[id][ps]);
      sort(vec.begin(), vec.end());
      cev.push_back(vec);
    }
    s.insert(cev);
    return;
  }
  for (long long i = (1); i <= (mx + 1); ++i)
    pos[i].push_back(ss[x]), dfs2(id, x + 1, max(mx, i)), pos[i].pop_back();
}
signed main() {
  n = read();
  m = read();
  k = read();
  for (long long i = (1); i <= (m); ++i) {
    long long u = read(), v = read();
    g[u][v] = g[v][u] = 1;
  }
  fac[0] = 1;
  for (long long i = (1); i <= (k); ++i) fac[i] = fac[i - 1] * (k - i + 1);
  dfs(1);
  for (long long i = (1); i <= (tot); ++i) {
    cnt = 0;
    for (long long j = (1); j <= (n); ++j)
      if (path[i][j] > j) ss[++cnt] = j;
    dfs2(i, 1, 0);
  }
  for (auto x : s) ans += fac[x.size()];
  printf("%lld\n", ans);
}
