There is an Annual function in the College and each event's participants will have a parade in the Opening Ceremony of the function.
Participants belonging to one event will form one queue according to the lexicographically sorted order of their names. It means the participant whose name comes first in the lexicographically sorted list of the names belonging to the same event, will comes first in the queue.
The Chairman of the College wants to give advices to the first two and the last two participant's of each event's queue in order to have a good parade.
Given the details of the events, i.e event name and the name of the participant belonging to that event, you need to extract the first two and last two participants belonging to each event when sorted lexicographically.
1) The given data contains some NULL values as Student Name. If the Student Name is NULL, then replace it with 'M.James' and then perform the required operation.
2) Check Sample I/O for more clarity. The extracted data should be in the same format as of sample output.
Table : Events
Sample Events table: