#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
template <class T>
using pq = priority_queue<T>;
template <class T>
using pqg = priority_queue<T, vector<T>, greater<T>>;
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char* x) { cerr << '\"' << x << '\"'; }
void __print(const string& x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V>& x) {
  cerr << '{';
  __print(x.first);
  cerr << ", ";
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T& x) {
  int first = 0;
  cerr << '{';
  for (auto& i : x) cerr << (first++ ? ", " : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const int MOD = 1000000007;
const char nl = '\n';
const int MX = 13;
int N, M, K;
long long ans = 0;
vector<int> color, match;
vector<int> cc[MX];
int nc = 0;
set<vector<int>> okMatches;
long long numWays[MX];
bool graph[MX][MX];
bool goMatch(int p) {
  if (p == N) {
    if (okMatches.count(match)) {
      ans += numWays[nc];
      return true;
    }
    return false;
  }
  if (match[p] != -1) {
    return goMatch(p + 1);
  }
  for (auto& a : cc[color[p]]) {
    if (a == p || match[a] != -1) continue;
    match[a] = p;
    match[p] = a;
    if (goMatch(p + 1)) return true;
    match[p] = -1;
    match[a] = -1;
  }
  return false;
}
void goColor(int p) {
  if (p == N) {
    for (int i = 0; i < (nc); i++)
      if ((int)(cc[i]).size() % 2) return;
    match = vector<int>(N, -1);
    goMatch(0);
    return;
  }
  int onc = nc;
  for (int i = 0; i < (onc + 1); i++) {
    ckmax(nc, i + 1);
    color[p] = i;
    cc[i].push_back(p);
    goColor(p + 1);
    cc[i].pop_back();
  }
  nc = onc;
}
void initMatch(int p) {
  if (p == N) {
    vector<vector<int>> pairs;
    for (int i = 0; i < (N); i++) {
      if (i < match[i]) {
        pairs.push_back({i, match[i]});
      }
    }
    bool ok[N / 2][N / 2];
    for (int i = 0; i < (N / 2); i++)
      for (int j = 0; j < (N / 2); j++) ok[i][j] = false;
    for (int i = 0; i < (N / 2); i++) {
      for (int j = 0; j < (N / 2); j++) {
        for (int a = 0; a < (2); a++) {
          for (int b = 0; b < (2); b++) {
            if (graph[pairs[i][a]][pairs[j][b]] &&
                graph[pairs[i][1 - a]][pairs[j][1 - b]]) {
              ok[i][j] = true;
            }
            if (i == j && graph[pairs[i][a]][pairs[j][b]]) {
              ok[i][j] = true;
            }
          }
        }
      }
    }
    vector<int> perm;
    for (int i = 0; i < ((int)(pairs).size()); i++) perm.push_back(i);
    do {
      bool val = true;
      for (int i = 0; i < (N / 2 - 1); i++)
        if (!ok[perm[i]][perm[i + 1]]) val = false;
      if (!ok[perm[0]][perm[0]]) val = false;
      if (val) {
        okMatches.insert(match);
        return;
      }
    } while (next_permutation(perm.begin(), perm.end()));
    return;
  }
  if (match[p] != -1) {
    initMatch(p + 1);
    return;
  }
  for (int a = p + 1; a < (N); a++) {
    if (a == p || match[a] != -1) continue;
    match[a] = p;
    match[p] = a;
    initMatch(p + 1);
    match[p] = -1;
    match[a] = -1;
  }
}
void solve() {
  cin >> N >> M >> K;
  numWays[0] = 1;
  for (int i = 1; i < (MX); i++) numWays[i] = numWays[i - 1] * (K - i + 1);
  for (int i = 0; i < (M); i++) {
    int X, Y;
    cin >> X >> Y;
    X--;
    Y--;
    graph[X][Y] = true;
    graph[Y][X] = true;
  }
  match = vector<int>(N, -1);
  color = vector<int>(N);
  initMatch(0);
  goColor(0);
  cout << ans << nl;
}
int main() {
  cin.tie(0)->sync_with_stdio(0);
  cin.exceptions(cin.failbit);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
