Buggy python submission (verdict: Runtime Error):
import numpy as np
s = input()
t = input()

dp = np.zeros((len(s) + 1, len(t) + 1))

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

answer = ''
i, j = len(s), len(t)
now = dp[i, j]
while i > 0 and j > 0:
    if dp[i-1, j] == now:
        i -= 1
        continue
    if dp[i, j-1] == now:
        j -= 1
        continue
    answer += s[i-1]
    i -= 1
    j -= 1
    now -= 1

print(answer[::-1])


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

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

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

answer = ''
i, j = len(s), len(t)
now = dp[i][j]
while i > 0 and j > 0:
    if dp[i-1][j] == now:
        i -= 1
        continue
    if dp[i][j-1] == now:
        j -= 1
        continue
    answer += s[i-1]
    i -= 1
    j -= 1
    now -= 1

print(answer[::-1])

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
s = input()
t = input()

dp = np.zeros((len(s) + 1, len(t) + 1), dtype=int)

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

answer = ''
i, j = len(s), len(t)
now = dp[i, j]
while i > 0 and j > 0:
    if dp[i-1, j] == now:
        i -= 1
        continue
    if dp[i, j-1] == now:
        j -= 1
        continue
    answer += s[i-1]
    i -= 1
    j -= 1
    now -= 1

print(answer[::-1])


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

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

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

answer = ''
i, j = len(s), len(t)
now = dp[i][j]
while i > 0 and j > 0:
    if dp[i-1][j] == now:
        i -= 1
        continue
    if dp[i][j-1] == now:
        j -= 1
        continue
    answer += s[i-1]
    i -= 1
    j -= 1
    now -= 1

print(answer[::-1])

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
s = input()
t = input()

dp = np.zeros((len(s) + 1, len(t) + 1))

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

answer = ''
i, j = len(s), len(t)
now = dp[i, j]
while i > 0 and j > 0:
    if dp[i-1, j] == now:
        i -= 1
        continue
    if dp[i, j-1] == now:
        j -= 1
        continue
    answer += s[i-1]
    i -= 1
    j -= 1
    now -= 1

print(answer[::-1])


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

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

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

answer = ''
i, j = len(s), len(t)
now = dp[i][j]
while i > 0 and j > 0:
    if dp[i-1][j] == now:
        i -= 1
        continue
    if dp[i][j-1] == now:
        j -= 1
        continue
    answer += s[i-1]
    i -= 1
    j -= 1
    now -= 1

print(answer[::-1])

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

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

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

answer = ''
i, j = len(s), len(t)
now = dp[i][j]
while i > 0 and j > 0:
    if dp[i-1][j] == now:
        i -= 1
        continue
    if dp[i][j-1] == now:
        j -= 1
        continue
    answer += s[i-1]
    i -= 1
    j -= 1
    now -= 1

print(answer[::-1])


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

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

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

answer = ''
i, j = len(s), len(t)
now = dp[i][j]
while i > 0 and j > 0:
    if dp[i-1][j] == now:
        i -= 1
        continue
    if dp[i][j-1] == now:
        j -= 1
        continue
    answer += s[i-1]
    i -= 1
    j -= 1
    now -= 1

print(answer[::-1])

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

dp = {}
for i in range(-1, len_s):
    dp[(i, -1)] = 0
for j in range(-1, len_t):
    dp[(-1, j)] = 0

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

answer = ''
i, j = len_s - 1, len_t - 1
now = dp[(i, j)]
while i > -1 and j > -1:
    if dp[(i-1, j)] == now:
        i -= 1
        continue
    if dp[(i, j-1)] == now:
        j -= 1
        continue
    answer += s[i]
    i -= 1
    j -= 1
    now -= 1

print(answer[::-1])


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

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

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

answer = ''
i, j = len(s), len(t)
now = dp[i][j]
while i > 0 and j > 0:
    if dp[i-1][j] == now:
        i -= 1
        continue
    if dp[i][j-1] == now:
        j -= 1
        continue
    answer += s[i-1]
    i -= 1
    j -= 1
    now -= 1

print(answer[::-1])

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

dp = {}
for i in range(-1, len_s):
    dp[(i, -1)] = 0
for j in range(-1, len_t):
    dp[(-1, j)] = 0

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

answer = ''
i, j = len_s - 1, len_t - 1
while i > -1 and j > -1:
    now = dp[(i, j)]
    if dp[(i-1, j)] == now:
        i -= 1
        continue
    if dp[(i, j-1)] == now:
        j -= 1
        continue
    answer += s[i]
    i -= 1
    j -= 1

print(answer[::-1])


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

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

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

answer = ''
i, j = len(s), len(t)
now = dp[i][j]
while i > 0 and j > 0:
    if dp[i-1][j] == now:
        i -= 1
        continue
    if dp[i][j-1] == now:
        j -= 1
        continue
    answer += s[i-1]
    i -= 1
    j -= 1
    now -= 1

print(answer[::-1])

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

dp = {}
for i in range(-1, len_s):
    dp[(i, -1)] = 0
for j in range(-1, len_t):
    dp[(-1, j)] = 0

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

answer = ''
i, j = len_s - 1, len_t - 1
while i > -1 and j > -1:
    now = dp[(i, j)]
    if dp[(i-1, j)] == now:
        i -= 1
        continue
    if dp[(i, j-1)] == now:
        j -= 1
        continue
    answer += s[i]
    i -= 1
    j -= 1

print(answer[::-1])


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

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

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

answer = ''
i, j = len(s), len(t)
now = dp[i][j]
while i > 0 and j > 0:
    if dp[i-1][j] == now:
        i -= 1
        continue
    if dp[i][j-1] == now:
        j -= 1
        continue
    answer += s[i-1]
    i -= 1
    j -= 1
    now -= 1

print(answer[::-1])