solve 1230_Nim