Prime Minister Narendra Modi, in a letter sent on former President Pranab Mukherjee’s last day in office, expressed his “profound sense of admiration and gratitude” for the outgoing president’s contribution to the country. Mukherjee shared the letter on Twitter on Thursday, saying it “touched my heart.”

In the letter, Modi said Mukherjee’s extensive knowledge of policy, politics and external affairs constantly helped his government. The prime minister said that though Mukherjee and he came from different political backgrounds and ideologies, the president’s wisdom and intellect helped them work together with synergy. “You belong to a generation of leaders for whom politics was simply a means to give back to society,” Modi told Mukherjee in the letter. “You stand as a great source of inspiration for the people of India.”

The prime minister called Mukherjee “a humble public servant and an exceptional leader.” He said that the president’s legacy will “continue to guide us.” He added that the government would continue to draw strength from Mukherjee’s democratic vision of taking everybody along.

On July 24, Modi had lavished praise on Mukherjee at a book release event at the Rashtrapati Bhavan in New Delhi, reported IANS. “I was surprised while working with Pranab da for three years,” Modi had said. “Despite having been a part of the government for so long, and that too in key decision-making positions, he never judged or compared my government’s decisions by his past experiences.”

National Democratic Alliance candidate Ram Nath Kovind was elected president on July 20, and took over from Mukherjee on July 25.