import java.util.*;

/**
 * @Author Mikhail Linkov
 * Date: 21.04.12
 */
public class ProblemF {

    private static int n;
    private static int [] pair;
    private static int [] woman;
    private static List<Integer> answer = new LinkedList<Integer>();
    private static int [][] edge;


    private static void manRec(int num) {
        if (num == n) {
            int f = 0;
            int sum = 0;
            for (int i = 0; i < n; i++) {
                if (pair[i] > -1) {
                    if (edge[i][pair[i]] > 0) {
                        sum += edge[i][pair[i]];
                    }
                    else {
                        f = 1;
                    }
                }
            }
            if (f == 0) {
                answer.add(sum);
            }
            return;
        }
        pair[num] = -1;
        manRec(num + 1);
        for (int i = 0; i < n; i++) {
            if (woman[i] == 0) {
                pair[num] = i;
                woman[i] = 1;
                manRec(num + 1);
                woman[i] = 0;
                pair[num] = -1;
            }
        }
    }

    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);

        n = scanner.nextInt();
        int m = scanner.nextInt();
        int count = scanner.nextInt();
        edge = new int[n][n];
        pair = new int[n];
        woman = new int[n];

        for (int i = 0; i < m; i++) {
            int h = scanner.nextInt() - 1;
            int w = scanner.nextInt() - 1;
            int t = scanner.nextInt();
            edge[h][w] = t;
        }

        manRec(0);


        Collections.sort(answer);


        System.out.println(answer.get(count - 1));

    }
}
