the main city magazine offer reader opportunity publish ad the format ad like thisThere spaceseparate nonempty word lowercase uppercase Latin lettersThere hyphen character word position set word wrapping point Word include hyphen it guarantee adjacent space adjacent hyphen no hyphen adjacent space there space hyphen word word when word wrap word hyphen hyphen stay current line word line you line break word case space stay current line check note well understandingthe ad occupy k lines minimal width the width ad maximal length string letter space hyphen count ityou write program find minimal width ad