write a program to check the overlapping of one string's suffix with the prefix of another string.
Sample input 1
ramisgood
goodforall
Sample output 1
good
Sample input 2
finally
restforall
Sample output 2
No overlapping
Expert's answer
f_str = input()
s_str = input()
s = "No overlapping"iflen(f_str) > len(s_str):
i = len(s_str)
else:
i = len(f_str)
while i > 0:
if f_str[len(f_str)-i:] == s_str[:i]:
s = s_str[:i]
break
i -= 1print(s)