Identify boundaries, print segments.