solve 1002