from collections import Counter
f = open('02-1.input')
rows = f.readlines()
f.close()
for i in range(0, len(rows) - 1):
    for j in range(i + 1, len(rows)):
        a = rows[i]
        b = rows[j]
        same = [a[ii] for ii in range(len(b)) if a[ii] == b[ii]]
        if len(same) == len(rows[i]) - 1:
            print(''.join(same))

b5fc445340283c7c56eba401969d73b508722833
<mask token>

<mask token>
f.close()
for i in range(0, len(rows) - 1):
    for j in range(i + 1, len(rows)):
        a = rows[i]
        b = rows[j]
        same = [a[ii] for ii in range(len(b)) if a[ii] == b[ii]]
        if len(same) == len(rows[i]) - 1:
            print(''.join(same))

<mask token>
f = open('02-1.input')
rows = f.readlines()
f.close()
for i in range(0, len(rows) - 1):
    for j in range(i + 1, len(rows)):
        a = rows[i]
        b = rows[j]
        same = [a[ii] for ii in range(len(b)) if a[ii] == b[ii]]
        if len(same) == len(rows[i]) - 1:
            print(''.join(same))

from collections import Counter
f = open('02-1.input')
rows = f.readlines()
f.close()
for i in range(0, len(rows) - 1):
    for j in range(i + 1, len(rows)):
        a = rows[i]
        b = rows[j]
        same = [a[ii] for ii in range(len(b)) if a[ii] == b[ii]]
        if len(same) == len(rows[i]) - 1:
            print(''.join(same))
