Text this: An Iterative Algorithm for a Hierarchical Problem