Solved getNth()

Can be improved