Brazil's Supreme Court decided on Thursday to end the mandatory imprisonment of convicted criminals after they lose their first appeal, restoring the previous rule that they should be allowed to exhaust all their appeal options before being locked up.