import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

public class Solution {
    //<editor-fold desc="input parse" defaultstate="collapsed">

    private static StringTokenizer st;
    private static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

    private static long nextLong() {
        return Long.parseLong(st.nextToken());
    }

    private static int nextInt() {
        return Integer.parseInt(st.nextToken());
    }

    private static double nextDouble() {
        return Double.parseDouble(st.nextToken());
    }

    private static short nextShort() {
        return Short.parseShort(st.nextToken());
    }

    private static byte nextByte() {
        return Byte.parseByte(st.nextToken());
    }

    private static void initTokenizer() throws Exception {
        st = new StringTokenizer(reader.readLine());
    }

    //</editor-fold>

    private static boolean[] mused;
    private static boolean[] wused;

    private static int[][] pair;

    private static ArrayList<Integer> results;

    private static void gen(int i, int happiness) {
        results.add(happiness);

        for (; i < pair.length; i++) {
            if (!mused[pair[i][0]] && !wused[pair[i][1]]) {
                mused[pair[i][0]] = wused[pair[i][1]] = true;
                gen(i + 1, happiness + pair[i][2]);
                mused[pair[i][0]] = wused[pair[i][1]] = false;
            }
        }
    }

    public static void main(String[] args) throws Exception {
        initTokenizer();

        int n = nextInt();

        int pairs = nextInt();

        int needed = nextInt();

        pair = new int[pairs][3];

        for (int i = 0; i < pairs; i++) {
            initTokenizer();

            pair[i][0] = nextInt() - 1;
            pair[i][1] = nextInt() - 1;
            pair[i][2] = nextInt();
        }

        mused = new boolean[n];
        wused = new boolean[n];

        results = new ArrayList<>(100000);

        gen(0, 0);

        Collections.sort(results);

        System.out.println(results.get(needed - 1));
    }
}