

import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;

import static java.lang.Math.*;

public class F implements Runnable{
    
    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");
    
    void init() throws FileNotFoundException{
        if (ONLINE_JUDGE){
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }else{
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }
    
    String readString() throws IOException{
        while(!tok.hasMoreTokens()){
            try{
                tok = new StringTokenizer(in.readLine());
            }catch (Exception e){
                return null;
            }
        }
        return tok.nextToken();
    }
    
    int readInt() throws IOException{
        return Integer.parseInt(readString());
    }
    
    long readLong() throws IOException{
        return Long.parseLong(readString());
    }
    
    double readDouble() throws IOException{
        return Double.parseDouble(readString());
    }
    
    public static void main(String[] args){
        new Thread(null, new F(), "", 256 * (1L << 20)).start();
    }
    
    long timeBegin, timeEnd;

    void time(){
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }
    
    long memoryTotal, memoryFree;
    

    void memory(){
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10) + " KB");
    }
    
    void debug(Object... objects){
        if (DEBUG){
            for (Object o: objects){
                System.err.println(o.toString());
            }
        }
    }
    
    public void run(){
        try{
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            time();
            memory();
        }catch (Exception e){
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }
    
    boolean DEBUG = false;
    
    int n;
    ArrayList<Point>[] list;
    
    boolean[] used;
    
    ArrayList<Integer> ans;
    
    void solve() throws IOException{
        n = readInt();
        list = new ArrayList[n];
        for (int i = 0; i < n; i++){
            list[i] = new ArrayList<Point>();
        }
        
        int k = readInt();
        int t = readInt();
        
        for (int i = 0; i < k; i++){
            int h = readInt() - 1;
            int w = readInt() - 1;
            int r = readInt();
            
            
            list[h].add(new Point(w, r));
        }
        
        ans = new ArrayList<Integer>();
        used = new boolean[n];
        
        ans.add(0);
        dfs(0, 0);
        
        Collections.sort(ans);
        out.print(ans.get(t - 1));
    }
    
    void dfs(int cur, int res){
        
        if (cur == n) return;
        
        for (Point p: list[cur]){
            if (used[p.x]) continue;
            
            ans.add(res + p.y);
            
            used[p.x] = true;
            dfs(cur + 1, res + p.y);
            used[p.x] = false;
        }
        
        dfs(cur + 1, res);
    }
}

