Solution to one of the puzzles in karan/Projects