Median String Problem