import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;

public class ab6 {

    public static void debug(Object... obs)
    {
        System.out.println(Arrays.deepToString(obs));
    }

    static int[][] h;
    static int[][] w;

    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());
        int t = Integer.parseInt(st.nextToken());

        h = new int[k][k];
        w = new int[k][k];

        for (int i = 0; i < k; i++)
        {
            st = new StringTokenizer(br.readLine());
            int hi = Integer.parseInt(st.nextToken()) - 1;
            int wi = Integer.parseInt(st.nextToken()) - 1;
            int ri = Integer.parseInt(st.nextToken());
            h[hi][wi] = ri;
            w[wi][hi] = ri;
        }

        int[] dp = new int[30000];
        boolean[] ah = new boolean[n];
        boolean[] aw = new boolean[n];

        bld_h(0, dp, aw, 0, n);

        //debug(dp);

        for (int i = 0; i < dp.length; i++)
        {
            if (dp[i] > 0)
            {
                t -= dp[i];
                if (t <= 0)
                {
                    System.out.println(i);
                    return;
                }
            }
        }

    }

    private static void bld_h(int p_h, int[] dp, boolean[] aw, int su, int n)
    {
        if (p_h == n)
        {
            dp[su]++;
            return;
        }

        bld_h(p_h + 1, dp, aw, su, n);
        
        for (int j = 0; j < n; j++)
        {
            if (!aw[j] && h[p_h][j] > 0)
            {
                aw[j] = true;
                bld_h(p_h + 1, dp, aw, su + h[p_h][j], n);

                aw[j] = false;
            }
        }
    }
}