BṚHADĀRAṆYAKA UPANISHAD · 4.4.4
तद् यथा पेशस्कारी पेशसो मात्राम् अपादायान्यन् नवतरं कल्याणतरं रूपं तनुते ।
एवम् एवायम् आत्मेदं शरीरं निहत्याविद्यां गमयित्वान्यन् नवतरं कल्याणतरं रूपं कुरुते ।
पित्र्यं वा गान्धर्वं वा दैवं वा प्राजापत्यं वा ब्राह्मं वान्येषां वा भूतानाम् ॥
tad yathā peśaskārī peśaso mātrām apādāyānyan navataraṃ kalyāṇataraṃ rūpaṃ tanute ।
evam evāyam ātmedaṃ śarīraṃ nihatyāvidyāṃ gamayitvānyan navataraṃ kalyāṇataraṃ rūpaṃ kurute ।
pitryaṃ vā gāndharvaṃ vā daivaṃ vā prājāpatyaṃ vā brāhmaṃ vānyeṣāṃ vā bhūtānām ॥
And as a goldsmith, taking a piece of gold, turns it into another, newer and more beautiful shape, so does this Self, after having thrown off this body and dispelled all ignorance, make unto himself another, newer and more beautiful shape, whether it be like the Fathers, or like the Gandharvas, or like the Devas, or like Pragâpati, or like Brahman, or like other beings.
F. Max Müller · The Upanishads, Sacred Books of the East 15 (1884)