resolving in-order print sequence