Bhagavad Gita 8.2
Who rules the spirit sacrifice in many, and how may those who have learned self-control come to the knowledge of Thee at the time of death?
अधियज्ञः कथं कोऽत्र देहेऽस्मिन्मधुसूदन।
प्रयाणकाले च कथं ज्ञेयोऽसि नियतात्मभिः॥adhiyajñaḥ kathaṃ ko'tra dehe'sminmadhusūdana|
prayāṇakāle ca kathaṃ jñeyo'si niyatātmabhiḥ||
English translation (above): Shri Purohit Swami (1935), public domain. Sanskrit text via github.com/gita/gita (Unlicense).