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