Heidelberg's Studentenkarzer was a prison that students tried to get into. The university locked up its rowdiest scholars for drunken singing, brawls, and, apparently, letting the local pigs out of their pens.
The punishment was lighter than it sounds. Bread and water for two days, a fee for each day inside, and then friends could bring meals, beer and wine. Students even went to lectures, as long as they came back afterwards. The walls are covered in graffiti. Mark Twain translated some, including one sentence: four weeks for "misinterpreted gallantry".
Two of VoiceMap's self-guided audio tours of Heidelberg stop here, and both tell Twain's story.