import java.io.*;
import java.security.SecureRandom;
import java.util.*;
import java.math.*;
import java.awt.geom.*;

import static java.lang.Math.*;

public class Solution implements Runnable {
    
	
	int h[];
	int w[];
	int r[];	
	TreeSet<Integer> a = new TreeSet<>();
	boolean used[];
	boolean used2[];
	
	void add(int s, int sum) {
		a.add(sum);
		for (int i = s;i < h.length; ++ i) {
			if (!used[h[i]] && !used2[w[i]]) {
				used[h[i]] = true;
				used[w[i]] = true;
				add(i + 1, sum + r[i]);
				used[h[i]] = false;
				used[w[i]] = false;
			}
		}
	}
	
	public void solve() throws Exception {
		
		int n = sc.nextInt();
		int k = sc.nextInt();
		int t = sc.nextInt();
		
		h = new int[k];
		w = new int[k];
		r = new int[k];
		
		for (int i = 0;i < k; ++ i) {
			h[i] = sc.nextInt() - 1;
			w[i] = sc.nextInt() - 1;
			r[i] = sc.nextInt();
		}
		
		used = new boolean[n];
		used2 = new boolean[n];
		for (int i = 0;i < n; ++ i) {
			add(i, 0);
		}
		a.add(0);
		ArrayList<Integer> a2 = new ArrayList<Integer>(a);
		out.println(a2.get(t - 1));
    }
    
    
    
    
    /*--------------------------------------------------------------*/
    
    static String filename = "";
    static boolean fromFile = false;
    
    BufferedReader in;
    PrintWriter out;
    FastScanner sc;
    
    public static void main(String[] args) {
        new Thread(null, new Solution(), "", 1 << 25).start();
    }
   
    public void run() {
        try {
            init();
            solve();
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
            out.close();
        }
    }
    
    void init() throws Exception {
    	if (fromFile) {
    		in = new BufferedReader(new FileReader(filename+".in"));
        	out = new PrintWriter(new FileWriter(filename+".out"));
    	} else {
    		in = new BufferedReader(new InputStreamReader(System.in));
        	out = new PrintWriter(System.out);
    	}
        sc = new FastScanner(in);
    }
}

class FastScanner {
    
    BufferedReader reader;
    StringTokenizer strTok;
    
    public FastScanner(BufferedReader reader) {
        this.reader = reader;
    }
    
    public String nextToken() throws IOException {
        while (strTok == null || !strTok.hasMoreTokens()) {
            strTok = new StringTokenizer(reader.readLine());
        }
        
        return strTok.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());
    }
    
    public BigInteger nextBigInteger() throws IOException {
    	return new BigInteger(nextToken());
    }
    
    public BigDecimal nextBigDecimal() throws IOException {
    	return new BigDecimal(nextToken());
    }
}