Bhagavad Gita · 10.20
अहमात्मा गुडाकेश सर्वभूताशयस्थितः।अहमादिश्च मध्यं च भूतानामन्त एव च॥
aham ātmā guḍākeśha sarva-bhūtāśhaya-sthitaḥ aham ādiśh cha madhyaṁ cha bhūtānām anta eva cha
I am the Self, O Gudakesha, seated in the hearts of all beings. I am the beginning, the middle, and the end of all beings.
— Bhagavad Gita 10.20
Source: Sacred-Texts.com (Sanskrit) + Bhagavad-Gita.io (translations)