solve problem49