Burglars lock themselves in a prison