TopCoder - OrderedNim: Accepted