The first line contains an integer N between 1 and 10 describing how many call forwarding systems will be simulated by your program. Each call forwarding system will be represented by 0 to 100 ‘source time duration target’ lines. These lines represent the requests by the users to set up a call forwarding from the source to the target starting at the time for a length of duration, and will be in the form ‘dddd dddd dddd dddd’. A line with ‘0000’ in the source position indicates the end of this portion of the input. The call forwarding requests are listed in the order received. They will be followed by 1 or more ‘time extension’ lines, in the form ‘dddd dddd’, in non-decreasing order by time representing calls made into the system at time to extension. A line with ‘9000’ in the time position indicates the end of this portion of the input.
The first line of output must read ‘CALL FORWARDING OUTPUT’. This will be followed by sections of information about each of the call forwarding systems being simulated. Each of these sections should be headed by the line ‘SYSTEM N ’, where N is the number (1, 2, ...) of the system. Within the section there should be a line describing the result of each of the calls made into the system, with the format ‘AT dddd CALL TO dddd RINGS dddd”. The final line of output should read ‘END OF OUTPUT’.