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

dp = [[[] for _ in range(len(t))] for _ in range(2)]

import copy

for i in range(1, len(s)):
    i0 = i % 2
    i1 = (i - 1) % 2
    for j in range(1, len(t)):
        if len(dp[i1][j]) > len(dp[i0][j - 1]):
            dp[i0][j] = dp[i1][j]
        else:
            dp[i0][j] = copy.copy(dp[i0][j - 1])
        if s[i] == t[j]:
            if len(dp[i1][j - 1]) + 1 > len(dp[i0][j]):
                dp[i1][j - 1].append(s[i])
                dp[i0][j] = dp[i1][j - 1]
print("".join(dp[(len(s) - 1) % 2][len(t) - 1]))

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

dp = [[0 for _ in range(len(t))] for _ in range(len(s))]

for i in range(1, len(s)):
    for j in range(1, len(t)):
        dp[i][j] = max(dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1] + (1 if s[i] == t[j] else 0))

i = len(s) - 1
j = len(t) - 1
c = 0
ans = []
ansl = dp[-1][-1]
while (c < ansl):
    if s[i] == t[j]:
        ans.append(s[i])
        i -= 1
        j -= 1
        c += 1
    else:
        if dp[i - 1][j] > dp[i][j - 1]:
            i -= 1
        else:
            j -= 1
ans.reverse()
print("".join(ans))

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

dp = [[[] for _ in range(len(t))] for _ in range(2)]

import copy

for i in range(1, len(s)):
    i0 = i % 2
    i1 = (i - 1) % 2
    for j in range(1, len(t)):
        if len(dp[i1][j]) > len(dp[i0][j - 1]):
            dp[i0][j] = copy.copy(dp[i1][j])
        else:
            dp[i0][j] = copy.copy(dp[i0][j - 1])
        if s[i] == t[j]:
            if len(dp[i1][j - 1]) + 1 > len(dp[i0][j]):
                dp[i1][j - 1].append(s[i])
                dp[i0][j] = dp[i1][j - 1]
print("".join(dp[(len(s) - 1) % 2][len(t) - 1]))

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

dp = [[0 for _ in range(len(t))] for _ in range(len(s))]

for i in range(1, len(s)):
    for j in range(1, len(t)):
        dp[i][j] = max(dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1] + (1 if s[i] == t[j] else 0))

i = len(s) - 1
j = len(t) - 1
c = 0
ans = []
ansl = dp[-1][-1]
while (c < ansl):
    if s[i] == t[j]:
        ans.append(s[i])
        i -= 1
        j -= 1
        c += 1
    else:
        if dp[i - 1][j] > dp[i][j - 1]:
            i -= 1
        else:
            j -= 1
ans.reverse()
print("".join(ans))

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

dp = [[[] for _ in range(len(t))] for _ in range(len(s))]

import copy
for i in range(1, len(s)):
    for j in range(1, len(t)):
        if len(dp[i-1][j]) > len(dp[i][j-1]):
            dp[i][j] = copy.copy(dp[i-1][j])
        else:
            dp[i][j] = copy.copy(dp[i][j-1])
        if s[i] == t[j]:
            tp = dp[i - 1][j - 1]
            tp.append(s[i])
            if len(tp) > len(dp[i][j]):
                dp[i][j] = tp
print("".join(dp[len(s) - 1][len(t) - 1]))

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

dp = [[0 for _ in range(len(t))] for _ in range(len(s))]

for i in range(1, len(s)):
    for j in range(1, len(t)):
        dp[i][j] = max(dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1] + (1 if s[i] == t[j] else 0))

i = len(s) - 1
j = len(t) - 1
c = 0
ans = []
ansl = dp[-1][-1]
while (c < ansl):
    if s[i] == t[j]:
        ans.append(s[i])
        i -= 1
        j -= 1
        c += 1
    else:
        if dp[i - 1][j] > dp[i][j - 1]:
            i -= 1
        else:
            j -= 1
ans.reverse()
print("".join(ans))