#include <bits/stdc++.h>
using namespace std;
int n, m, k, bl[12];
bool vis[12], E[12][12];
long long ans, s;
vector<vector<int> > V, part;
unordered_set<long long> se;
vector<int> cur;
long long H(vector<int> p) {
  s = 0;
  for (int i = (0), iend = (n - 1); i <= iend; ++i) s = s * n + p[i];
  return s;
}
void dfs0(int now) {
  if (now == n)
    part.push_back(cur);
  else
    for (int i = (0), iend = (n - 1); i <= iend; ++i)
      if (!vis[i] && bl[now] == bl[i] && i != now && (i > now || cur[i] == now))
        cur.push_back(i), vis[i] = 1, dfs0(now + 1), vis[i] = 0, cur.pop_back();
}
void dfs(int now) {
  if (now == n) {
    bool asf = 0;
    for (const auto& v : V)
      if (v.size() % 2) return;
    for (const auto& v : V)
      for (const auto& x : v) bl[x] = v[0];
    part.clear(), dfs0(0);
    for (const auto& p : part)
      if (se.count(H(p))) {
        asf = 1;
        break;
      }
    if (asf) {
      long long res = 1;
      for (int i = (1), iend = (V.size()); i <= iend; ++i) res *= k - i + 1;
      ans += res;
    }
    return;
  }
  for (int i = (0), iend = (V.size() - 1); i <= iend; ++i)
    V[i].push_back(now), dfs(now + 1), V[i].pop_back();
  V.push_back({now}), dfs(now + 1), V.pop_back();
}
int main() {
  cin >> n >> m >> k;
  while (m--) {
    int u, v;
    cin >> u >> v, u--, v--, E[u][v] = E[v][u] = 1;
  }
  dfs0(0);
  for (const auto& p : part) {
    bool asf = 0;
    int U[6], V[6], ct = 0;
    for (int i = (0), iend = (n - 1); i <= iend; ++i)
      if (i < p[i]) U[ct] = i, V[ct] = p[i], ct++;
    int q[6];
    for (int i = (0), iend = (ct - 1); i <= iend; ++i) q[i] = i;
    do {
      int x = U[q[0]], y = V[q[0]];
      bool flg = E[x][y];
      for (int i = (1), iend = (ct - 1); i <= iend; ++i) {
        int u = U[q[i]], v = V[q[i]];
        flg &= (E[x][u] && E[y][v]) || (E[x][v] && E[y][u]), x = u, y = v;
      }
      if (flg) {
        asf = 1;
        break;
      }
    } while (next_permutation(q, q + ct));
    if (asf) se.insert(H(p));
  }
  return dfs(0), cout << ans, 0;
}
