– President Obama hailed the courage and quick thinking of three high school friends who helped avert tragedy on a Paris-bound train last month as they came to the White House on Thursday, where he labeled them “the very best of America.”

“Because of their courage, because of their quick thinking, because of their teamwork, a real calamity was averted,” Obama said as he sat beside the three men — Spencer Stone, Alek Skarlatos and Anthony Sadler — in the Oval Office. “It’s these kinds of young people who make me extraordinarily optimistic and hopeful about our future. I thank each and every one of them and wish them well.”

It was just the latest honor for the three friends who were traveling through Europe on Aug. 21 when an armed gunman attempted to open fire on a train from Amsterdam to Paris they were riding.

Skarlatos and Stone quickly moved to subdue the man, ultimately tackling him to the ground as he tried to shoot at them. Stone was wounded when the man slashed at him with a box cutter. Sadler and a British businessman helped hogtie the gunman on the floor of the train.

French President Francois Hollande awarded each the Legion D’honneur at the Èlysèe Palace in Paris, saying they faced down the “evil” of terrorism and prevented carnage. The trio was also feted at a parade in Sacramento, Calif., last week.

Skarlatos, a member of the Oregon National Guard, and Stone, who serves in the Air Force, wore their formal military dress for the presidential encounter. Sadler, a student at California State University, Sacramento, opted for a sharp blazer but no tie for the setting.

Obama teased Skarlatos for his quick addition to the cast of “Dancing With the Stars” while noting he planned to ultimately serve in law enforcement. But whatever each man ultimately does, “They’re going to do it well,” the president said.

“We just wanted to say thank you to them not only for saving so many lives,” Obama said, “but also for making America look so good.”