import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskF1 solver = new TaskF1();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskF1 {
        ArrayList<Integer> setCosts;
        int[][] cost;
        int[] perm;
        int n;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            n = in.nextInt();
            int k = in.nextInt();
            int t = in.nextInt();
            cost = new int[n + 1][n + 1];
            for (int i = 0; i < k; i++) {
                cost[in.nextInt()][in.nextInt()] = in.nextInt();
            }
            perm = new int[n + 1];
            setCosts = new ArrayList<>();
            comb(1);
            setCosts.sort(Integer::compareTo);
            out.println(setCosts.get(t - 1));
        }

        void comb(int h) {
            if (h > n) {
                int setCost = 0;
                for (int i = 1; i <= n; i++) {
                    if (perm[i] == 0) continue;
                    if (cost[i][perm[i]] == 0) return;
                    setCost += cost[i][perm[i]];
                }
                setCosts.add(setCost);
                return;
            }
            for (int i = 0; i <= n; i++) {
                perm[h] = i;
                boolean uniq = true;
                if (perm[h] != 0) {
                    for (int j = 1; j < h; j++) {
                        if (perm[j] == perm[h]) uniq = false;
                    }
                }
                if (uniq) {
                    comb(h + 1);
                }
            }
        }

    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer stt;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                return null;
            }
        }

        public String next() {
            while (stt == null || !stt.hasMoreTokens()) {
                stt = new StringTokenizer(nextLine());
            }
            return stt.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

