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

public class Main implements Runnable {
       
        class Edge implements Comparable<Edge>{
            int from, to, cost;
            Edge(int from, int to, int cost){
                this.from = from; this.to = to; this.cost = cost;
            }
            
            public int compareTo(Edge b){
                return cost - b.cost;
            }
        }
       
        
        ArrayList<Edge> graph;
        int N, K, T;
	public void solve() throws IOException {
		N = nextInt();
                K = nextInt();
                T = nextInt();
                graph = new ArrayList<>();
                
                for(int i = 0; i < K; i++){
                    int from = nextInt() - 1; //boy
                    int to = nextInt() - 1; //girl
                    int cost = nextInt();
                    graph.add(new Edge(from, to, cost));
                }
                
                Collections.sort(graph);
                
              //Binary search
             int left = -1, right = 0;
             for(int i = 0; i < K; i++) right += graph.get(i).cost;
             
             while((right - left) > 1){
                 int mid = (left + right) / 2;
                 
                 if(cnt(mid) >= T)
                     right = mid;
                 else
                     left = mid;
             }
             
             
             System.out.println(right);
	}
       
        static int counter;
        
        public int cnt(int limit){
            counter = 0;
            doit(0, limit, (1<<N)-1, (1<<N)-1);
            return counter;
        }
        
        public void doit(int x, int limit, int boyMask, int girlMask){
            ++counter;
            if(counter > T) return;
            
            for(int i = x; i < K && graph.get(i).cost <= limit; i++){
                if( ((boyMask >> graph.get(i).from) & 1) > 0 && ((girlMask >> graph.get(i).to) & 1) > 0){
                       doit(i+1, limit - graph.get(i).cost, boyMask - (1 << graph.get(i).from), girlMask - (1 << graph.get(i).to));
                }
            }
        }
        
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	//-----------------------------------------------------------
	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;
}