mark and toys hackerrank solution