Write a program which determines the Mth to the last element in a list.
The first argument is a path to a file. The file contains the series of space delimited characters followed by an integer. The integer represents an index in the list (1-based), one per line.
Print to stdout the Mth element from the end of the list, one per line. If the index is larger than the number of elements in the list, ignore that input.