President Trump stunned the world when he announced that he would meet with North Korean leader Kim Jong Un sometime before May. If he is, in fact, serious about this decision and expects to strike a deal with the North Koreans regarding their growing nuclear arsenal, he should seek the counsel of three people: former presidents Jimmy Carter and Bill Clinton, and former secretary of state Madeleine Albright.

All three American leaders have traveled to Pyongyang, met with the North Korean leadership and experienced the regime’s empty gestures and flattery as well as its serious attempts at diplomacy. Though none of them were ultimately successful in persuading North Korea to commit to a meaningful long-term weapons deal, they did achieve some positive results, especially regarding the release of imprisoned Americans. The experiences of Carter, Clinton and Albright reveal how effective the regime has been at both toadyism and sincerity, a complicated set of signals and strategies that Trump must navigate if he wants to reach a deal.

Carter’s experience dealing with North Korea extends back to his presidency, when he attempted to withdraw almost all of the 37,000 U.S. forces stationed on the Korean Peninsula and alter the balance of power in East Asia in a way no American head of state has tried since. Although his policy ultimately was not implemented — thanks to vigorous opposition from both U.S. allies and Congress — he maintained a high level of interest in North Korea’s affairs, and Clinton sent him to North Korea in 1994 to try to halt the regime’s strides toward nuclear weapons development and prevent a potential military confrontation over the issue.

The Clinton administration instructed Carter to present himself as a private citizen and not an envoy dispatched at its behest. Carter negotiated a deal (known as the Agreed Framework) that consisted of a North Korean promise to stop plutonium production in exchange for a U.S. promise to provide North Korea with light-water nuclear reactors for energy production. Upon his return, Carter called Kim Il Sung “vigorous and intelligent” and declared that the “crisis is over.”

Although there has been much speculation as to just how much of an influence Carter had in stalling what now appears to have been an inevitable march toward nuclearization, his efforts did manage to halt North Korea’s nuclear ambitions for about a decade, for which he won a Nobel Peace Prize. In 2010, Carter again proved to be an effective negotiator in freeing American teacher and missionary Aijalon Gomes, who had been sentenced to hard labor for illegally entering North Korea through China.

The Clinton administration’s talks with North Korea were not limited to Carter. Albright also faced the challenge of cutting through North Korean attempts at flattery and building enough of a rapport to reach a deal that would prevent the regime of Kim Jong Il (Kim Jong Un’s father) from developing ballistic missiles and selling them abroad.

Arriving in Pyongyang in late October 2000, she was greeted with what the New York Times described as “a gargantuan spectacle of about 100,000 performers that celebrated the cult of her host,” Kim Jong Il. Her trip to Pyongyang was rife with spectacle and flattery, but she returned with little to show for her efforts, in part because of the change of administration in the United States shortly afterward.

Clinton continued his engagement with the North Koreans after he exited office. In 2009, journalists Euna Lee and Laura Ling were arrested by Kim Jong Il’s regime and sentenced to 12 years of hard labor for entering the country illegally. After rejecting both former vice president Al Gore and former New Mexico governor Bill Richardson as potential envoys, the North Koreans chose Clinton as their preferred emissary. He referred to himself as a private citizen, much as Carter did in 1994, and flew to Pyongyang to negotiate the release of the two women.

After a 20-hour visit, Clinton secured the release of both journalists. Although the extent of the conversation between Clinton and Kim Jong Il is known to only a few people, most accounts available refer to Clinton’s amiable gestures toward the North Korean leader — including a letter of condolence to Kim after his father died in 1994 and possibly an apology regarding Lee and Ling’s illegal entry as the reasons for his success.

Clinton’s efforts show that successful diplomacy with North Korea has been defined by releasing imprisoned Americans, not necessarily fulfilling larger strategic goals.

As Tufts University political scientist Sung-Yoon Lee has argued, previous diplomatic agreements aimed at achieving these larger strategic goals have instead given North Korea billions of dollars in aid in exchange for false promises to scale back its nuclear program. The U.S. policy of “strategic patience” has produced few results and has seemed only to encourage the regime’s worst tendencies.

Indeed, plenty of commentators were critical of the efforts undertaken by Carter, Clinton and Albright, arguing that the presidents blundered because North Korea never intended to agree to a long-term cessation of its nuclear program and that the United States should have attacked their facilities when it had the chance. They saw Albright’s trip to Pyongyang as merely a photo op, maintaining that she was woefully unprepared to deal with a regime that intended to lie about its weapons from the beginning.

But as the experiences of Carter, Clinton and Albright show, personal interactions with the regime matter. This knowledge can only help diplomacy.

Carter’s understanding, for example, leads him to believe that Kim Jong Un, like his father and grandfather, is primarily interested in the survival of his country and that he wants a dialogue with the West to ensure that no outside power will try to destroy it. No one can really know what North Korea ultimately intends to do with its weapons, but Carter’s perspective might offer Trump some insight into how to prevent an armed conflict. Kim Jong Un is likely to cling to his weapons of mass destruction after witnessing the demise of fellow dictators Saddam Hussein and Moammar Gaddafi — both of whom abandoned their nuclear programs only to end up at the mercy of their vengeful countrymen, assisted by U.S. forces. But armed with this understanding, Trump just might be able to offer Kim a deal that would include assurances that his regime would not be at risk.

Diplomatic relations with North Korea also hinge on properly handling propaganda and symbolic interactions. Clinton, Carter and Albright can provide Trump with knowledge about how to handle these tactics during a visit and how to use these gestures to his advantage. None of this knowledge will guarantee Trump success, but given how these past efforts have produced partial successes, and given the cloistered nature of the Kim regime, it could prove invaluable in developing a viable strategy for any potential meeting between Kim and Trump.