n = 0
k = 0
t = 0
M = {}
u = []
count = 0

def rec(lim, i, points):
    global count, u, t, n, M
    count += 1
    if count >= t: return True
    if i == n: return False
    for m in M[i]:
        if u[m[0]] or m[1] + points >= lim: continue
        u[m[0]] = True
        if rec(lim, i+1, points + m[1]): return True
        u[m[0]] = False
    count -= 1
    if rec(lim, i+1, points): return True
    return False

def solve():
    # read data
    global n, k, t, u, M, count
    read = reader()
    n, k, t = list(map(int, next(read).split()))
    t -= 1
    if t == 0:
        print(0)
        return
    for i in range(n):
        M[i] = []
    for i in range(k):
        m = tuple(map(int, next(read).split()))
        m = (m[0] - 1, m[1] - 1, m[2])
        M[m[0]].append((m[1], m[2]))
    for i in range(n):
        M[i].sort()
        
    # solve
    lb, ub = 0, 2 * 10**5 + 2
    while ub - lb > 1:
        count = 0
        u = [False] * n
        mid = (ub+lb)//2
        if rec(mid, 0, 0):
            ub = mid
        else: lb = mid
    print(lb)


def reader():
    if False:
        with open("F.in", "r") as fin:
            while True:
                yield next(fin)
    else:
        try: input = raw_input
        except: pass
        while True:
            yield input()       
            
solve()