working, but needs optimzation
added def for shortest string
added def to check the substrings, added instance variables, added 4th string check
final version, working, redesigned