Detect cycles in Print.