Task: Text to Code
Input (English): select the row whose goals for record of all rows is 2nd maximum . the team record of this row is blackpool mechanics .
Output (English): eq { hop { nth_argmax { all_rows ; goals for ; 2 } ; team } ; blackpool mechanics }