Punishment

A punishment is when a player becomes chained to an iron ball. A player can become punished by reading a scroll of punishment or praying while his deity is angry.

Reading a non-confused scroll of remove curse (of any BUC status) removes the chain.

Also, you may dig or find a pit, drop the ball in it and push a boulder on it, which destroys the chain.

Finally, you can polymorph. Polymorph into a nymph to remove it by using the #monster command. You can also polymorph into a metallivore and eat the ball or chain. The third option is to polymorph into an amorphous, whirly or non-solid monster and thus slip out of the chain.