Added solution to Sherlock and Queries