S=[input()for _ in[1]*100] [print(w[:min(i for i in range(len(w))if all(x==w or w[:i]!=x[:i]for x in S))])for w in S]
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page