using recursion to find winning and losing position.
remembering the results from previous version.
Passed System Test.
try to solve using pattern.
using pattern for div1.
solved using pattern.