Overview

This Java code is designed to extract numbers based on the position provided in each line and to handle queries concerning these numbers. If the position does not exist, it will output "ERROR!"

Problem Description

Given a set of lines where each line contains a series of space-separated integers, this script aims to output the number located at a specified position in each line. If the requested position doesn't exist within a line, the script will print "ERROR!" for that query.