Buggy python submission (verdict: Runtime Error):
import numpy as np

s = input()
t = input()

len_s = len(s)
len_t = len(t)

dp = np.zeros((len_s+1, len_t+1), dtype = int)

for i in range(len_s):
    for j in range(len_t):
        if s[i] == t[j]:
            dp[i+1, j+1] = np.maximum( dp[i+1, j+1], dp[i, j] + 1)
        dp[i+1, j+1] = np.maximum(dp[i+1,j+1], dp[i+1,j])
        dp[i+1, j+1] = np.maximum(dp[i+1,j+1], dp[i,j+1])
#        print(dp)

i = len_s
j = len_t
str = ''

while i > 0 and j > 0:
    if dp[i-1, j] == dp[i, j]:
        i -= 1
    elif dp[i, j-1] == dp[i, j]:
        j -= 1
    else:
        str += s[i-1]
        i -= 1
        j -= 1
           
print(str[::-1])


Fixed submission:
s = input()
t = input()

len_s = len(s)
len_t = len(t)

dp = [ [0 for _ in range(len_t+1)] for _ in range(len_s+1) ]

for i in range(len_s):
        for j in range(len_t):
                if s[i] == t[j]:
                    dp[i+1][j+1] = max( dp[i+1][j+1], dp[i][j]+1 )
                dp[i+1][j+1] = max( dp[i+1][j+1], dp[i+1][j] )
                dp[i+1][j+1] = max( dp[i+1][j+1], dp[i][j+1] )

i = len_s
j = len_t
str = ''

while i > 0 and j > 0:
        if dp[i-1][j] == dp[i][j]:
            i -= 1
        elif dp[i][j-1] == dp[i][j]:
            j -= 1
        else:
            str += s[i-1]
            i -= 1
            j -= 1
            
print(str[::-1])

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
t = input()

len_s = len(s)
len_t = len(t)

dp = [ [0 for _ in range(len_t+1)] for _ in range(len_s+1) ]

for i in range(len_s):
        for j in range(len_t):
                if s[i] == t[j]:
                    dp[i+1][j+1] = max( dp[i+1][j+1], dp[i][j]+1 )
                dp[i+1][j+1] = max( dp[i+1][j+1], dp[i+1][j] )
                dp[i+1][j+1] = max( dp[i+1][j+1], dp[i][j+1] )

i = len_s
j = len_t
str = ''

while i > 0 and j > 0:
        if dp[i-1][j] == dp[i][j]:
            i -= 1
        elif dp[i][j-1] == dp[i][j]:
            j -= 1
        else:
            str += s[i-1]
            i -= 1
            j -= 1
            
print(str[::-1])

Fixed submission:
s = input()
t = input()

len_s = len(s)
len_t = len(t)

dp = [ [0 for _ in range(len_t+1)] for _ in range(len_s+1) ]

for i in range(len_s):
        for j in range(len_t):
                if s[i] == t[j]:
                    dp[i+1][j+1] = max( dp[i+1][j+1], dp[i][j]+1 )
                dp[i+1][j+1] = max( dp[i+1][j+1], dp[i+1][j] )
                dp[i+1][j+1] = max( dp[i+1][j+1], dp[i][j+1] )

i = len_s
j = len_t
str = ''

while i > 0 and j > 0:
        if dp[i-1][j] == dp[i][j]:
            i -= 1
        elif dp[i][j-1] == dp[i][j]:
            j -= 1
        else:
            str += s[i-1]
            i -= 1
            j -= 1
            
print(str[::-1])

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

s = input()
t = input()

len_s = len(s)
len_t = len(t)

dp = np.zeros((len_s+1, len_t+1), dtype = int)

for i in range(len_s):
        for j in range(len_t):
                if s[i] == t[j]:
                        dp[i+1, j+1] = np.maximum( dp[i+1, j+1], dp[i, j] + 1)
                dp[i+1, j+1] = np.maximum(dp[i+1,j+1], dp[i+1,j])
                dp[i+1, j+1] = np.maximum(dp[i+1,j+1], dp[i,j+1])
                # print(dp)

# print(dp[len_s,len_t])

i = len_s
j = len_t
str = ''

while i > 0 and j > 0:
        if dp[i-1, j] == dp[i, j]:
            i -= 1
        elif dp[i, j-1] == dp[i, j]:
            j -= 1
        else:
            str += s[i-1]
            i -= 1
            j -= 1
            
print(str[::-1])


Fixed submission:
s = input()
t = input()

len_s = len(s)
len_t = len(t)

dp = [ [0 for _ in range(len_t+1)] for _ in range(len_s+1) ]

for i in range(len_s):
        for j in range(len_t):
                if s[i] == t[j]:
                    dp[i+1][j+1] = max( dp[i+1][j+1], dp[i][j]+1 )
                dp[i+1][j+1] = max( dp[i+1][j+1], dp[i+1][j] )
                dp[i+1][j+1] = max( dp[i+1][j+1], dp[i][j+1] )

i = len_s
j = len_t
str = ''

while i > 0 and j > 0:
        if dp[i-1][j] == dp[i][j]:
            i -= 1
        elif dp[i][j-1] == dp[i][j]:
            j -= 1
        else:
            str += s[i-1]
            i -= 1
            j -= 1
            
print(str[::-1])