A group of middle school boys in Kansas made sure Valentine's Day was special for every girl in their school: They gave all of them a flower.

Photos posted to social media on Thursday by Summit Trail Middle School in Olathe, Kansas, show the grinning boys holding a bucket of bright pink carnations. Dozens of girls are also pictured posing with their flowers.

The boys' generosity was a carefully planned effort, according to the school's principal. Sarah Guerrero told USA TODAY on Thursday that one of boys approached her with the idea a few weeks ago.

Tristan Valentine, an eighth-grader, wanted to do something special for Valentine's Day, Guerrero said. “He wanted every young lady to feel special that day and accepted.”

Valentine and two other boys arranged the funding and used some of their own money to buy the flowers, according to Guerrero.

They carefully planned how they would distribute the gifts at various school doors on Valentine's Day, doing their best to make sure no one was skipped. They distributed the flowers with words of encouragement, she said.

“Happy Valentine's Day”

“Hope you feel special today”

They even gave the male staff members carnations, Guerrero said.

Photos:Valentine's Day celebrated around the world

Jan. 30:Father and son “let it go” with flawless dance moves

In total about 270 girls and 70 staff members were given flowers. To some, it was a touching moment.

Guerrero said one girl approached her with the pink carnation in her hair. She told the principal that at her old school, she used to hate Valentines day because she wouldn't get presents.

The experience made Guerrero feel like the school, which is in its first year, has built a sense of community. It made her feel as if the school has become a family, she said.

Valentine was joined by Kyan Rice, a seventh-grader, and Lincoln Holmes, a sixth-grader, Guerrero said.

And many other boys wished they had thought of the idea, the principal said.