memorizing
To memorize something is to remember it very well. You might memorize the lyrics to a song, the order of the planets, or the names of the presidents.
She was trying to memorize the names of all the presidents.
He was trying to memorize the capitals of all the countries.