Solving problem Sherlock and Watson.