A prisoner was trying to escape from a jail in Brazil when he got stuck in the hole he had painstakingly fashioned.