Czechia medalled at the World Juniors for the third straight year after they won bronze in dramatic fashion over Sweden.