Input (grade 10): New South Wales is bordered on the north by Queensland, on the west by South Australia, on the south by Victoria and on the east by the Tasman Sea.
Output (grade 7): The state is bordered on the north by Queensland, on the west by South Australia, and on the south by Victoria.