Professor McGonagall led them into the dining hall, placed a four-legged stool in the very front, and placed a patched, frayed, and dirty hat on the stool. All at once everyone got quiet, then the hat began to sing.
"Oh you may not think I'm pretty,
But don't judge on what you see,
I'll eat myself if you can find
A smarter hat than me.
You can keep your bowlers black,
Your top hats sleek and tall,
For I'm the Hogwarts Sorting Hat
And I can cap them all.
There's nothing hidden in your head
The Sorting Hat can't see,
So try me on and I will tell you
Where you ought to be.
You might belong in Gryffindor,
Where dwell the brave at heart,
Daring, nerve, and chivalry
Set Gryffindors apart;
You might belong in Hufflepuff,
Where they are just and loyal,
These patient Hufflepuffs are true
And unafraid of toil;
Or yet in wise old Ravenclaw,
If you've a ready mind,
Where those of wit and learning
Will always find their kind;
Or perhaps in Slytherin
You'll make your real friends
Those cunning folk use any means
To achieve their ends.
So try me on! Don't be afraid!
And don't get in a flap!
You're in safe hands (though I have none)
For I'm a Thinking Cap!"
The dining hall burst into applause after the hat had finished it's song. Professor McGonagall said, "When I call your name you will go sit down and put the hat on. Abott, Hannah!" The hat said, "HUFFFLEPUFF!"
The Hufflepuffs cheered loudly for their new member. "Bones, Susan!" "HUFFLEPUFF!"

"Boot, Terry!" "RAVENCLAW!"

"Brocklehurst, Mandy!" "RAVENCLAW!"

"Brown, Lavender!" "GRYFFINDOR!"

"Bulstrode, Millicent!" "SLYTHERIN!"

"Flinch-Fletchley, Justin!" "HUFFLEPUFF!"

Granger, Hermione" "GRYFFINDOR!"

"Greengrass, Daphne!" Harry smiled at her. "SLYTHERIN!" "Higgs, Harold" "SLYTHERIN!" "Longbottom, Neville!"
"GRYFFINDOR!"

"MacDougal, Morag" Malfoy swaggered up. The hat touched his head and said, "SLYTHERIN!" There weren't many people left now. "Moon, Nott, Parkinson, Patil, Patil, Perks." Then finally, "Potter, Harry!" Harry walked up and put the hat on. "Hmm... Where shall I put you?" The hat said. Just put me where I will be best," thought Harry. "Difficult, very difficult. Plenty of courage. Not a bad mind, either. Plenty of talent, and a thirst to prove yourself. I know where to put you... SLYTHERIN!" Dumbledore, McGonagall, and Hagrid were all stunned.