content: 
  ===Writing===
  "Walk of Punishment" was written by the show creators and executive producers David Benioff and D. B. Weiss, based on material from George R. R. Martin's novel ''A Storm of Swords''. The episode adapts parts of chapters 15, 16, 18, 20, 22, 24, 28, 32, 34 and 36 of the book (Catelyn II, Jon II, Arya III, Tyrion III, Jaime III, Daenerys II, Daenerys III, Jaime IV, Samwell II and Catelyn IV). The writers also included original storylines including Theon's flight, Tyrion bringing Podrick to a brothel, and Melisandre departing Dragonstone.
  In the scene at the brothel, Tyrion claims that the last prostitute he introduces is one of the few women in the world able to perform "the Meereenese Knot". This is an inside joke referring to the name that Martin gave (after the legendary Gordian Knot) to a complicated structural problem that he had to face while writing the fifth book of the series, ''A Dance with Dragons''. This book had to synchronize the arrival of several characters in the city of Meereen while keeping the chronology and causations in line and informing the reader of events happening in places where no point-of-view character was present. Martin worked on solving "the Meereenese Knot" from 2005 to 2011, and it was one of the main causes behind the late delivery of the book.