Buggy python submission (verdict: Runtime Error):

a = int(input())
b = []
c = []
ans = ""

for i in range(a):
    b.append(input())
    c.append(len(b[i]))

print(b[1])
print(min(c))

alpha = [chr(i) for i in range(97,97+26)]
print(alpha)

if min(c) >= a:
    for ii in range(26):
        d = []
        for i in range(a):
            d.append(b[i].count(alpha[ii]))
        ans = ans + (alpha[ii] * min(d))
        if len(ans) > a:
            break

if len(ans) < a:
    ans = ""
else:
    ans[0:a-1]
            
print(ans)

Fixed submission:

a = int(input())
b = []
c = []
ans = ""

for i in range(a):
    b.append(input())
    c.append(len(b[i]))

alpha = [chr(i) for i in range(97,97+26)]

for ii in range(26):
    d = []
    for i in range(a):
        d.append(b[i].count(alpha[ii]))
    ans = ans + (alpha[ii] * min(d))
           
print(ans)

Buggy python submission (verdict: Runtime Error):

a = int(input())
b = []
c = []
ans = ""

for i in range(a):
    b.append(input())
    c.append(len(b[i]))

print(b[1])
print(min(c))

alpha = [chr(i) for i in range(97,97+26)]
print(alpha)

if min(c) >= a:
    for ii in range(26):
        d = []
        for i in range(a):
            d.append(b[i].count(alpha[ii]))
        ans = ans + (alpha[ii] * min(d))
        if len(ans) > a:
            break

if len(ans) < a:
    ans = ""
else:
    ans[0:a-1]
            
print(ans)

Fixed submission:

a = int(input())
b = []
c = []
ans = ""

for i in range(a):
    b.append(input())
    c.append(len(b[i]))

alpha = [chr(i) for i in range(97,97+26)]

for ii in range(26):
    d = []
    for i in range(a):
        d.append(b[i].count(alpha[ii]))
    ans = ans + (alpha[ii] * min(d))
           
print(ans)

Buggy python submission (verdict: Runtime Error):
from goto import goto, label

a = int(input())

for i in range(a):
    b[i] = input()
    c[i] = len(b[i])

alpha = [chr(i) for i in range(97,97+26)]

if min(c) < a:
    ans = ""
else:
    for ii in range(25):
        for i in range(a):
            d[i] = b[i].count(alpha[ii])
            ans = ans + alpha[ii] * min(d)
            if len(ans) > a:
                goto .END
label .END

Fixed submission:

a = int(input())
b = []
c = []
ans = ""

for i in range(a):
    b.append(input())
    c.append(len(b[i]))

alpha = [chr(i) for i in range(97,97+26)]

for ii in range(26):
    d = []
    for i in range(a):
        d.append(b[i].count(alpha[ii]))
    ans = ans + (alpha[ii] * min(d))
           
print(ans)

Buggy python submission (verdict: Runtime Error):
from goto import goto, label

a = int(input())

for i in range(a):
    b[i] = input()
    c[i] = len(b[i])

alpha = [chr(i) for i in range(97,97+26)]

if min(c) < a:
    ans = ""
else
    for ii in range(25):
        for i in range(a):
            d[i] = b[i].count(alpha[ii])
            ans = ans + alpha[ii] * min(d)
            if len(ans) > a:
                goto .END
label .END

Fixed submission:

a = int(input())
b = []
c = []
ans = ""

for i in range(a):
    b.append(input())
    c.append(len(b[i]))

alpha = [chr(i) for i in range(97,97+26)]

for ii in range(26):
    d = []
    for i in range(a):
        d.append(b[i].count(alpha[ii]))
    ans = ans + (alpha[ii] * min(d))
           
print(ans)