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;
        }
        
        boolean[]dp=new boolean[30000];
        boolean[]ah=new boolean[n];
        boolean[]aw=new boolean[n];
        
        bld_h(0,dp,ah,aw,0,n,h,w);
        
        dp[0]=true;
        
        //debug(dp);
        
        for(int i=0;i<dp.length;i++)
        {
            if(dp[i])
            {
                if(t==1)
                {
                    System.out.println(i);
                    return;
                }
                else
                {
                    t--;
                }
            }
        }
        
    }

    private static void bld_h(int pos, boolean[] dp,boolean[]ah,boolean[]aw, int su,int n,int[][]hi,int[][]wi)
    {
        if(pos==n) return;
        
        for(int i=0;i<n;i++)
        {
            if(ah[i]) continue;

            ah[i]=true;
            for(int j=0;j<n;j++)
            {
                if(!aw[j] && hi[i][j]>0)
                {
                    su+=hi[i][j];
                    dp[su]=true;
                    aw[j]=true;
                    bld_h(pos+1,dp,aw,ah,su,n,wi,hi);
                    
                    aw[j]=false;
                    su-=hi[i][j];
                }
            }
            ah[i]=false;
        }
    }
}