#include <bits/stdc++.h>
using namespace std;
const int M = 12;
long long read() {
  long long x = 0, f = 1;
  char c;
  while ((c = getchar()) < '0' || c > '9') {
    if (c == '-') f = -1;
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
long long n, m, k, ans, g[M][M], a[M], p[M], fac[M];
map<long long, bool> dp;
void init(long long nc) {
  long long x = n;
  for (long long i = 0; i < n; i++)
    if (p[i] == -1) {
      x = i;
      break;
    }
  if (x == n) {
    long long f[1 << 6][M] = {}, p1[M] = {}, p2[M] = {};
    for (long long i = 0; i < n; i++) {
      p2[p[i]] = p1[p[i]];
      p1[p[i]] = i;
    }
    for (long long i = 0; i < nc; i++)
      if (g[p1[i]][p2[i]]) f[1 << i][i] = 1;
    for (long long i = 0; i < (1 << nc); i++)
      for (long long j = 0; j < nc; j++)
        if (f[i][j])
          for (long long k = 0; k < nc; k++) {
            if (i & (1 << k)) continue;
            f[i | (1 << k)][k] |= (g[p1[k]][p1[j]] && g[p2[k]][p2[j]]);
            f[i | (1 << k)][k] |= (g[p1[k]][p2[j]] && g[p2[k]][p1[j]]);
          }
    for (long long i = 0; i < nc; i++)
      if (f[(1 << nc) - 1][i]) {
        long long num = 0;
        for (long long j = 0; j < n; j++) num = num * 6 + p[j];
        dp[num] = 1;
        break;
      }
    return;
  }
  for (long long i = x + 1; i < n; i++)
    if (p[i] == -1) {
      p[x] = p[i] = nc;
      init(nc + 1);
      p[x] = p[i] = -1;
    }
}
long long dfs(long long p[]) {
  long long rn[M], cur[M] = {}, t[M] = {}, cnt = 0, num = 0;
  memset(rn, -1, sizeof rn);
  for (long long i = 0; i < n; i++)
    if (rn[p[i]] == -1) rn[p[i]] = cnt++;
  for (long long i = 0; i < n; i++) {
    t[i] = rn[p[i]];
    cur[t[i]]++;
    num = num * 6 + t[i];
  }
  if (dp.count(num)) return dp[num];
  long long res = 0;
  for (long long i = 0; i < n && !res; i++)
    if (cur[t[i]] > 2)
      for (long long j = i + 1; j < n; j++)
        if (t[i] == t[j]) {
          long long tmp = t[i];
          t[i] = t[j] = cnt;
          res |= dfs(t);
          t[i] = t[j] = tmp;
          if (res) break;
        }
  return dp[num] = res;
}
void zxy(long long nc) {
  long long x = n;
  for (long long i = 0; i < n; i++)
    if (p[i] == -1) {
      x = i;
      break;
    }
  if (x == n) {
    dfs(p);
    return;
  }
  for (long long c = 0; c <= nc; c++)
    for (long long i = x + 1; i < n; i++)
      if (p[i] == -1) {
        p[x] = p[i] = c;
        zxy(max(c + 1, nc));
        p[x] = p[i] = -1;
      }
}
signed main() {
  n = read();
  m = read();
  k = read();
  for (long long i = 1; i <= m; i++) {
    long long u = read() - 1, v = read() - 1;
    g[u][v] = g[v][u] = 1;
  }
  memset(p, -1, sizeof p);
  init(0);
  zxy(0);
  fac[0] = 1;
  for (long long i = 1; i <= k; i++) fac[i] = fac[i - 1] * i;
  for (auto x : dp)
    if (x.second) {
      long long num = x.first, mx = 1;
      while (num) {
        mx = max(mx, num % 6 + 1);
        num /= 6;
      }
      if (mx <= k) ans += fac[k] / fac[k - mx];
    }
  printf("%lld\n", ans);
}
