Note: Contains spoilers for season eight, episode one of Game of Thrones.

Do you remember your lessons? Who built the iron throne? And who built the red keep? And how many years did it take to build?

Sansa Stark has been dutifully learning her lessons since she was a girl. History, sewing, prayers, singing, horse riding. As a teenager in Winterfell and King’s Landing, we see her practicing her embroidery and reciting facts with her teacher, Septa Mordane. Her advice extends beyond the strictly curricular – Septa Mordane teaches Sansa how to live. Forgive your father. Remember where you come from. Do not open the door to anyone you don’t know.

When Game of Thrones begins, Sansa is young, romantic, impulsive, and incredibly naïve. She is a largely obedient student, but her lessons have little urgency. It’s only after her naivety and romanticism leads her into a chain of events that ends with the brutal, public execution of her father and her teacher that she is forced to learn how to survive the hard way. How to lie. How to run. How to hide. How to fight. How to lead.

By the time we get to this final season, the results of all Sansa’s years of learning are becoming evident. It’s often remarked upon that Sansa is perhaps the most brutalised character in the whole series – despite some serious competition. Now, though she is only 20, she also seems like one of the most wise. In the first episode of season eight, “Winterfell”, the show’s most respected characters are suddenly starting to realise her strength. “Many underestimated you,” Tyrion observes to Sansa. “Most of them are dead now.” “She’s the smartest person I’ve ever met,” Arya says to Jon.

Perhaps it was Arya who predicted Sansa’s path. In season one, quoting her sword fighting instructor, Arya remarks cheerfully: “Every hurt is a lesson, and every lesson makes you better.” If hurts are lessons, Sansa is taught far more than most. First, there’s her engagement to Joffrey, which teaches her that fairy tale romance is the stuff of fantasy, and that power breeds violence and cruelty, not benevolence and nobility. She learns how to bury her feelings under a veneer of compliance without extinguishing her desire for her freedom. Joffrey calls his many violences against her lessons (“Will you obey now?” he says after ordering a soldier to hit her. “Or do you need another lesson?”), but he does not realise that all he has taught her is resilience.

After her father’s death, Sansa trusts no one. She maintains a façade of loyalty to Joffrey around everyone – even those who try to help her. In King’s Landing and beyond, she learns the manipulative, Machiavellian operations of power, and how to survive and anticipate even the most sadistic game-playing from Cersei and Lord Baelish and Lord Bolton. “I learned a lot from her,” Sansa observes to Jon of Cersei. Sansa is often criticised for trusting Lord Baelish – but she never really did. She is suspicious of him from their very first meeting, she goes along with his plans not because she believes he is looking out for her, but because she has no other choice – relying on him to escape from King’s Landing, to hide from Lannister soldiers in the Eyrie, and to defeat the Boltons in the Battle of the Bastards. She knows when to call on him for help, and when to dispose of him. When she is finally safe, secure, and no longer needs him, she executes him. “Thank you for your many lessons, Lord Baelish,” she says as a farewell. “I will never forget them.”

Perhaps that’s why she’s starting to look like such a strong contender for the Iron Throne. Daenerys and Jon are more obvious choices: the books are called A Song of Ice and Fire, and both have been heavily signalled as the figures in which Ice and Fire meet – either as joint rulers, with the Mother of Dragons bringing the fire and the King in the North bringing the ice, or in Jon alone, thanks to his unique mix of Targaryen and Stark blood. But Sansa also looks like a mix of both ice and fire. In the books, her unusual Tulley colouring of red hair and blue eyes is repeatedly remarked upon: Sansa has “fire in [her] hair” – like all red-headed people in the series, she is thought to have been “kissed by fire”. And like her mother Catelyn, Sansa is a product of House Stark and House Tulley– a mixing of North and South, winter and summer, Winterfell and Riverrun, ice and fire.

But even if Daenerys and Jon have a stronger connection to the royal bloodline, the best claim to the throne is not necessarily the best head for the crown. Dany and Jon have both been propelled towards leadership – Dany by her single-minded belief in her own destiny to rule the Seven Kingdoms, Jon by his unwavering sense of morality and honesty, his desire to do what’s right. Both have seemingly inherited these traits from their ancestors – though Dany has repeatedly insisted that she is not like her father, the Mad King Aerys Targaryen, they share far more similarities than they have differences – both are tempestuous, proud rulers with Messiah complexes, an unshakable belief in their own authority, a taste for incest, and willingness to murder anyone who opposes them. Jon, too, is built in the model of his adoptive father Ned Stark – he is noble, righteous, humble, honourable, and honest – to a fault. There’s a reason that Ned, for all his goodness, did not survive the first season of Thrones – but Jon still takes Ned’s conduct as a model for his own. Only Sansa seems truly willing to learn from her family’s faults. “You have to be smarter than father,” she tells Jon. “You need to be smarter than Robb. I loved them, I miss them, but they made stupid mistakes, and they both lost their heads for it.”

Being treated like a pawn has given Sansa a comprehensive view of the entire chessboard. She has been embedded inside House Baratheon, House Lannister, House Tyrell, House Arryn, House Bolton, and each one has taught her something about power, and the many ways there are to wield it. Sansa’s understanding of power has fluctuated between extremes - from a girlish fantasy of the seat of power as the home of noble Knights and golden ornate dresses and an endless supply of soft lemon cakes to the realisation that power lives in the places where she was most viciously brutalised to bolster the supremacy of weaker men. She has become sceptical and calculating as a result – but never cruelly manipulative or violently vengeful. She has only killed twice – setting the dogs on Lord Bolton, and her sister on Lord Baelish – but they have been the most important deaths of the last three seasons. And since she escaped House Bolton more than two seasons ago, Sansa has been refining a more productive, democratic approach to power in her role as Lady of Winterfell, considering the wants and needs of the people she governs alongside her own insights. Jon and Dany have so far achieved their positions through belligerent insistence on their beliefs (which might work in a time of crisis against a single common, existential thread, but once peace arrives, problems are sure to appear). Sansa, by contrast, has been flexible, shrewd, and adaptable. And when a pawn makes it all the way across the board alive, it becomes a queen.

Sansa is the only character to understand the depths of Cersei’s selfishness and duplicity, the only character to realise her promise to help fight the White Walkers is false. She is the only character to realise that Jon’s title is important when it comes to amassing an army in the North. She is one of the only characters to realise that Daenerys’s thirst for power will eventually come at a cost. And she seems to be one of the only characters to realise that to survive, you need to know not just your superiors and your enemies, but your subjects, too. More and more, she looks like a ruler – and one who will actually do what’s best for Westeros . And what makes her abilities the most satisfying of all is that we’ve seen her get there – step by step, day by day. Hers is not a story of blood, or will, or destiny – but gradual, steady growth. “I’m a slow learner, it’s true,” Sansa says at the close of season seven. “But I do learn.” If there’s any justice in the world of Game of Thones – all that learning will be for something. And you should see her in a crown.