the thinking experience leads to the acceptance of something, an I, which is engaged with the thinking. Paying attention to the thinking leads to a series of ramifications and confirmatory (whether hallucinatory or not) apprehensions, which are taken to constitute some hazy but ultimately viable, usable notion of a self.
Observation of behaviour of other apparent selves in the world leads again to a conclusion that these are most likely to be other instances of self-hood.
etcetera