He came across the one he sought almost at once, the young Dumbledore and his handsome companion, roaring with laughter at some longforgotten joke. Harry dropped his eyes to the caption.

Albus Dumbledore, shortly after his mother’s death, with his friend Gellert Grindelwald.


Harry gaped at the last word for several long moments. Grindelwald. His friend Grindelwald. He looked sideways at Hermione, who was still contemplating the name as though she could not believe her eyes. Slowly she looked up at Harry.
“Grindelwald?”

Harry Potter and the Deathly Hollows - Chapter 18 : The Life and Lies of Albus Dumbledore
See this quote in the Pensive -