Task: Text to Code
Input (English): select the row whose gold record of all rows is 2nd maximum . the nation record of this row is mexico .
Output (English): eq { hop { nth_argmax { all_rows ; gold ; 2 } ; nation } ; mexico }