working word chainer class, complete with pretty printing of chains