thanks for replying mirni,
there is no logic in order, of input...
let us assume
A-source
1-message
B-destination..
so whenever we parse message, eg-1;
it should print all the messages passing between sources and destination..
after getting parsed ,it should print reponses from the destination
for eg-
if A,1,B is first line then,
B,1_1,A
should immediately follow after the first line,
and hence there is some logic in getting the output
it is something like, B is sending some response ACK for the message 1 to A
and same follows to other inputs..
input file
A,1,B A,2,B A,1,C C,1_1,A B,2,D B,1_1,A B,2_2,A B,2_2,Dafter parsing
A,1,B B,1_1,A
A,1,C C,1_1,A
A,2,B B,2_2,A B,2,D D,2_2,Dthis is the required output:-)
thanks and regards
raghuraipur