They put in years of training. They sacrificed their social lives and their families. They flew around the world during a pandemic to compete in the Tokyo Olympics.

Only to be told once they got there that they didn’t qualify.

Six Polish swimmers are fuming after the country’s swimming federation put 23 athletes on the plane to Japan when they were only meant to send 17. They had taken the Olympic oath and departed Poland to great fanfare, but they didn’t even make it as far as Friday’s Opening Ceremonies.

Alicja Tchorz, an Olympian at the 2012 London Games and 2016 Rio Games, took to social media to vent her frustration over missing her third Olympics because of an apparent administrative bungle.

“Imagine dedicating 5 years of your life and striving for another start at the most important sporting event … giving up your private life and work, sacrificing your family etc.,” she wrote Sunday in a Facebook post.

All that dedication resulted in a “total flop,” she said. She wrote that she was struggling to gather her thoughts as she packed her suitcase to return to Warsaw, angry that she had been denied her dreams “because of the incompetence of third parties.”

A statement signed by members of the swimming team demanded the resignation of the president of the Polish Swimming Federation, Paweł Słomiński, and the management board.

In a four-page statement explaining the error, Słomiński expressed “regret, sadness and bitterness” about the athletes’ situation.

He attempted to apportion some of the blame on the country’s Olympic committee, and the international federation that sets the qualifying rules, saying that he did not receive a clear message from either until July 14 regarding his request to accept the six swimmers to compete.

The Polish swimming officials’ desire, he said, was “to allow as many players and coaches as possible to take part" in the Olympics.

The swimming federation president also noted that many of the team’s Olympic preparations were carried out during a “very difficult period of the pandemic” with the country’s swimming pools closed.

The International Olympic Committee didn’t immediately respond to a request for comment on the reasons for the swimmers’ disqualification, and how they made it as far as Tokyo before learning of the issue.

All six were originally named to the Polish lineup as relay-only swimmers, according to the swimming news website SwimSwam. Olympic qualification standards specify that each nation may enter relay-only athletes provided they have at least achieved the "B" standard for the corresponding stroke and distance of the relay in which they are entered. But Poland reportedly filled more than its allowed spots and had to decide who should leave.

A video shared on Twitter by a Polish journalist showed the dejected athletes sharing hugs with their teammates before leaving Tokyo over the weekend.

Mateusz Chowaniec, another of the six swimmers to be sent home, wrote on Instagram that he was “deeply shocked” by what he described as incompetent management.

“This is an absurd situation for me that should never have happened,” he wrote. “In fact, I hope to wake up from this NIGHTMARE eventually!”

The swimmers’ early departure puts a question mark over Poland’s ability to piece together enough swimmers to compete in relays, especially the women’s 4x100 meter freestyle and the men’s 4x200 meter relay, SwimSwam reported. Swimming events begin July 24.