import java.util.*;
import java.io.*;

public class Main implements Runnable {
       
        class Edge{
            int to, cost;
            Edge(int to, int cost){
                this.to = to; this.cost = cost;
            }
        }
       
        
        ArrayList<Edge>[] graph;
        int N, K, T;
	public void solve() throws IOException {
		N = nextInt();
                K = nextInt();
                T = nextInt();
                graph = new ArrayList[N];
                for(int i = 0; i < N; i++) graph[i] = new ArrayList<>();
                
                for(int i = 0; i < K; i++){
                    int from = nextInt() - 1; //boy
                    int to = nextInt() - 1; //girl
                    int cost = nextInt();
                    graph[from].add(new Edge(to, cost));
                }
                
                pq = new PriorityQueue(100000, new Comparator<Integer>(){
                    @Override
                    public int compare(Integer a, Integer b){
                        return -(a - b);
                    }
                }); //will store the good costs
                
                was = new boolean[N];
                
                doit(0); //backtracking solution
                //for(int i : pq) System.out.println( " " + i);
                
                System.out.println(pq.peek());
	}

	static int curCost = 0;
        PriorityQueue<Integer> pq;
        boolean[] was;
        
        private void doit(int x){
            if(x == N){
                pq.add(curCost);
                if(pq.size() > T)
                    pq.poll();
                
                return;
            }
            
            doit(x+1);
            
            for(int i = 0; i < graph[x].size(); i++){
                Edge con = graph[x].get(i);
                if(!was[con.to]){
                    was[con.to] = true;
                    curCost += con.cost;
                    doit(x+1);
                    was[con.to] = false;
                    curCost -= con.cost;
                }
            }
            
        }
        
        
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	//-----------------------------------------------------------
	public static void main(String[] args) {
		new Main().run();
	}

        public void print1Int(int[] a){
                for(int i = 0; i < a.length; i++)
                        System.out.print(a[i] + " ");
                System.out.println();
        }
        
        public void print2Int(int[][] a){
                for(int i = 0; i < a.length; i++){
                        for(int j = 0; j < a[0].length; j++){
                                System.out.print(a[i][j] + " ");
                        }
                        System.out.println();
                }
        }
        
	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			tok = null;
			solve();
			in.close();
		} catch (IOException e) {
			System.exit(0);
		}
	}

	public String nextToken() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	BufferedReader in;
	StringTokenizer tok;
}