Yet Another Nim Game (Constructive version)

Problem Name:
Yet Another Nim Game (Constructive version)
Site:CodeForces
Links:
Tags: