Hernandez locks in medal in Rio