#include <bits/stdc++.h>
int max(int a, int b) { return a > b ? a : b; }
unsigned int X;
int rand_() { return (X *= 3) >> 1; }
void srand_() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  X = tv.tv_sec ^ tv.tv_usec | 1;
}
char adj[12][12];
int aa[12], n, m, a1;
void decode(long long x) {
  int i;
  for (i = n - 1; i >= 0; i--) aa[i] = x % 12, x /= 12;
}
long long encode() {
  int i;
  long long x;
  x = 0;
  for (i = 0; i < n; i++) x = x * 12 + aa[i];
  return x;
}
int mate[12], uu[12], vv[12], n_;
int feasible() {
  static char can[1 << 12 / 2][12 / 2];
  int b, i, j;
  n_ = 0;
  for (i = 0; i < n; i++)
    if (i < mate[i]) uu[n_] = i, vv[n_] = mate[i], n_++;
  memset(can, 0, (1 << n_) * sizeof *can);
  for (i = 0; i < n_; i++) can[1 << i][i] = 1;
  for (b = 0; b < 1 << n_; b++)
    for (i = 0; i < n_; i++)
      if (can[b][i])
        for (j = 0; j < n_; j++)
          if ((b & 1 << j) == 0 && (adj[uu[i]][uu[j]] && adj[vv[i]][vv[j]] ||
                                    adj[uu[i]][vv[j]] && adj[vv[i]][uu[j]]))
            can[b | 1 << j][j] = 1;
  for (i = 0; i < n_; i++)
    if (adj[uu[i]][vv[i]] && can[(1 << n_) - 1][i]) return 1;
  return 0;
}
long long solutions[3000000];
int c;
void brute2(int i, int a_) {
  int a;
  if (i == n_) {
    solutions[c++] = encode();
    return;
  }
  for (a = 0; a < a_; a++) aa[uu[i]] = aa[vv[i]] = a, brute2(i + 1, a_);
  aa[uu[i]] = aa[vv[i]] = a_, brute2(i + 1, a_ + 1);
}
void brute1(int i) {
  if (i == n) {
    if (feasible()) brute2(0, 0);
    return;
  }
  if (mate[i] != -1)
    brute1(i + 1);
  else {
    for (mate[i] = i + 1; mate[i] < n; mate[i]++)
      if (mate[mate[i]] == -1)
        mate[mate[i]] = i, brute1(i + 1), mate[mate[i]] = -1;
    mate[i] = -1;
  }
}
void sort(long long *aa, int l, int r) {
  while (l < r) {
    int i = l, j = l, k = r;
    long long a = aa[l + rand_() % (r - l)], tmp;
    while (j < k)
      if (aa[j] == a)
        j++;
      else if (aa[j] < a) {
        tmp = aa[i], aa[i] = aa[j], aa[j] = tmp;
        i++, j++;
      } else {
        k--;
        tmp = aa[j], aa[j] = aa[k], aa[k] = tmp;
      }
    sort(aa, l, i);
    l = k;
  }
}
int main() {
  int h, i, j;
  long long ans;
  srand_();
  scanf("%d%d%d", &n, &m, &a1);
  while (m--) {
    scanf("%d%d", &i, &j), i--, j--;
    adj[i][j] = adj[j][i] = 1;
  }
  memset(mate, -1, n * sizeof *mate);
  brute1(0);
  sort(solutions, 0, c);
  ans = 0;
  for (h = 0; h < c; h++)
    if (h == 0 || solutions[h] != solutions[h - 1]) {
      long long x;
      int a_, a;
      decode(solutions[h]);
      a_ = 0;
      for (i = 0; i < n; i++) a_ = max(a_, aa[i]);
      a_++;
      x = 1;
      for (a = 0; a < a_; a++) x *= (a1 - a);
      ans += x;
    }
  printf("%lld\n", ans);
  return 0;
}
