a->b->c->d->e->a
return b->c->d->e->a or a->b->c->d->e
follow up What if the number of node exceed 1000 thousand, how to skip some node
Hint two set