State lets an object change its behavior when its internal state
changes, by delegating to a state object instead of branching on a status
flag everywhere.
A Document moves draft → review → published each time.publish() is called; calling it again once published is a no-op.
Implement DraftState, ReviewState and PublishedState, each
implementing .publish(doc) (transitions doc.state) and .name().
solve(actions_list) creates one fresh Document per entry and calls.publish() that many times, returning the final .status() for each.
Sample tests