def checkio(words_set):
for word1 in words_set:
for word2 in words_set:
if word1.endswith(word2):
return True
return False
#These "asserts" using only for self-checking and not necessary for auto-testing
if __name__ == '__main__':
assert checkio({"hello", "lo", "he"}) == True, "helLO"
assert checkio({"hello", "la", "hellow", "cow"}) == False, "hellow la cow"
assert checkio({"walk", "duckwalk"}) == True, "duck to walk"
assert checkio({"one"}) == False, "Only One"
assert checkio({"helicopter", "li", "he"}) == False, "Only end"
# your code goes here
ZGVmIGNoZWNraW8od29yZHNfc2V0KToKICAgIGZvciB3b3JkMSBpbiB3b3Jkc19zZXQ6CiAgICAgICAgZm9yIHdvcmQyIGluIHdvcmRzX3NldDoKICAgICAgICAgICAgaWYgd29yZDEuZW5kc3dpdGgod29yZDIpOgogICAgICAgICAgICAgICAgcmV0dXJuIFRydWUKICAgICAgICByZXR1cm4gRmFsc2UKCiNUaGVzZSAiYXNzZXJ0cyIgdXNpbmcgb25seSBmb3Igc2VsZi1jaGVja2luZyBhbmQgbm90IG5lY2Vzc2FyeSBmb3IgYXV0by10ZXN0aW5nCmlmIF9fbmFtZV9fID09ICdfX21haW5fXyc6CiAgICBhc3NlcnQgY2hlY2tpbyh7ImhlbGxvIiwgImxvIiwgImhlIn0pID09IFRydWUsICJoZWxMTyIKICAgIGFzc2VydCBjaGVja2lvKHsiaGVsbG8iLCAibGEiLCAiaGVsbG93IiwgImNvdyJ9KSA9PSBGYWxzZSwgImhlbGxvdyBsYSBjb3ciCiAgICBhc3NlcnQgY2hlY2tpbyh7IndhbGsiLCAiZHVja3dhbGsifSkgPT0gVHJ1ZSwgImR1Y2sgdG8gd2FsayIKICAgIGFzc2VydCBjaGVja2lvKHsib25lIn0pID09IEZhbHNlLCAiT25seSBPbmUiCiAgICBhc3NlcnQgY2hlY2tpbyh7ImhlbGljb3B0ZXIiLCAibGkiLCAiaGUifSkgPT0gRmFsc2UsICJPbmx5IGVuZCIKIyB5b3VyIGNvZGUgZ29lcyBoZXJl