<garvit244>1092_1.py
def lcs(A, B):
    n, m = len(A)+1, len(B)+1
    dp = [["" for _ in range(m)] for _ in range(n)]
    for index_i in range(1, n):
        for index_j in range(1, m):
            if A[index_i-1] == B[index_j-1]:
                dp[index_i][index_j] = dp[index_i-1][index_j-1] + A[index_i - 1]
            else:
                dp[index_i][index_j] = max(dp[index_i-1][index_j], dp[index_i][index_j-1], key=len)
    return dp[-1][-1]
def sample_funcname ( var_0 , var_1 ) :
    var_4 , var_5 = len ( var_0 ) + 1 , len ( var_1 ) + 1
    var_9 = [ [ "" for var_7 in range ( var_5 ) ] for var_7 in range ( var_4 ) ]
    for var_10 in range ( 1 , var_4 ) :
        for var_11 in range ( 1 , var_5 ) :
            if var_0 [ var_10 - 1 ] == var_1 [ var_11 - 1 ] :
                var_9 [ var_10 ] [ var_11 ] = var_9 [ var_10 - 1 ] [ var_11 - 1 ] + var_0 [ var_10 - 1 ]
            else :
                var_9 [ var_10 ] [ var_11 ] = max ( var_9 [ var_10 - 1 ] [ var_11 ] , var_9 [ var_10 ] [ var_11 - 1 ] , var_12 = len )
    return var_9 [ - 1 ] [ - 1 ]
