I=lambda:list(map(int,input().split()))
n,k,T=I()
t=[I()for _ in '0'*k]
def b(h,w,r,a):
	if h>n:a+=[r]
	else:
		b(h+1,w,r,a)
		for f,s,v in t:
			if f==h and s in w:b(h+1,w-set([s]),r+v,a)
	return a
print(sorted(b(1,set(range(1,n+1)), 0,[]))[T-1])