#include <bits/stdc++.h>
using namespace std;
int n, k, t, l, x, y, z, a[25][25], i[5], j[5], p, u[25];
vector<int> ans;
int main() {
  scanf("%d%d%d", &n, &k, &t);
  for (i[0] = 0; i[0] < k; i[0]++) {
    scanf("%d%d%d", &x, &y, &z);
    a[x][y] = z;
  }
  ans.push_back(0);
  p = 0;
  for (i[0] = 1; i[0] <= n; i[0]++)
    for (j[0] = 1; j[0] <= n; j[0]++)
      if (a[i[0]][j[0]] != 0) {
        u[j[0]] = 1;
        p = a[i[0]][j[0]];
        ans.push_back(p);
        if (n > 1)
          for (i[1] = i[0] + 1; i[1] <= n; i[1]++)
            for (j[1] = 1; j[1] <= n; j[1]++)
              if (!u[j[1]] && a[i[1]][j[1]] != 0) {
                u[j[1]] = 1;
                p += a[i[1]][j[1]];
                ans.push_back(p);
                if (n > 2)
                  for (i[2] = i[1] + 1; i[2] <= n; i[2]++)
                    for (j[2] = 1; j[2] <= n; j[2]++)
                      if (!u[j[2]] && a[i[2]][j[2]] != 0) {
                        u[j[2]] = 1;
                        p += a[i[2]][j[2]];
                        ans.push_back(p);
                        if (n > 3)
                          for (i[3] = i[2] + 1; i[3] <= n; i[3]++)
                            for (j[3] = 1; j[3] <= n; j[3]++)
                              if (!u[j[3]] && a[i[3]][j[3]] != 0) {
                                u[j[3]] = 1;
                                p += a[i[3]][j[3]];
                                ans.push_back(p);
                                if (n > 4)
                                  for (i[4] = i[3] + 1; i[4] <= n; i[4]++)
                                    for (j[4] = 1; j[4] <= n; j[4]++)
                                      if (!u[j[4]] && a[i[4]][j[4]] != 0) {
                                        u[j[4]] = 1;
                                        p += a[i[4]][j[4]];
                                        ans.push_back(p);
                                        u[j[4]] = 0;
                                      }
                                u[j[3]] = 0;
                              }
                        u[j[2]] = 0;
                      }
                u[j[1]] = 0;
              }
        u[j[0]] = 0;
      }
  sort(ans.begin(), ans.end());
  for (i[0] = 1; i[0] < ans.size(); i[0]++) {
    if (ans[i[0]] == ans[i[0] - 1]) {
      ans.erase(ans.begin() + i[0]);
      i[0]--;
    }
  }
  printf("%d\n", ans[t - 1]);
  return 0;
}
