import java.io.*;
import java.util.*;
public class F1 {
	
	int n, k, t, cnt;
	int[] s, match;
	int[][] c;
	boolean[] free;
	public void solve() throws IOException {
		n = nextInt();
		k = nextInt();
		t = nextInt();
		c = new int[n][n];
		s = new int[1000100];
		match = new int[n];
		free = new boolean[n];
		for (int i = 0; i < k; i++) {
			int u = nextInt();
			int v = nextInt();
			int cost = nextInt();
			u--;
			v--;
			c[u][v] = cost;
		}
		for (int i = 0; i < n; i++) match[i] = -1;
		Arrays.fill(free, true);
		go(0);
		Arrays.sort(s, 0, cnt);
		writer.println(s[t - 1]);
	}
	
	void go(int at) {
		if (at == n) {
			int sum = 0;
			for (int i = 0; i < n; i++)
				if (match[i] != -1)
					sum += c[i][match[i]];
			//writer.println(sum);
			s[cnt++] = sum;
			return;
		}
		go(at + 1);
		for (int i = 0; i < n; i++)
			if (c[at][i] > 0 && free[i]) {
				match[at] = i;
				free[i] = false;
				go(at + 1);
				match[at] = -1;
				free[i] = true;
			}
	}

	public static void main(String[] args) throws FileNotFoundException {
		new F1().run();
	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter writer;

	public void run() {
		try {
			long tbegin = System.currentTimeMillis();
			reader = new BufferedReader(new InputStreamReader(System.in));
			//reader = new BufferedReader(new InputStreamReader(new FileInputStream("input.txt")));
			tokenizer = null;
			writer = new PrintWriter(System.out);
			//writer = new PrintWriter(new FileOutputStream("output.txt"));
			solve();
			//reader.close();
			//System.out.println(System.currentTimeMillis() - tbegin + "ms");
			writer.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

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

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

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

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

}
