flag = True indicates that a pair exists between L and R
if ( flag == true ) { document . write ( " " + possibleA + " " + possibleB + " " + possibleC + " " + " " + L + " " + R + " " ) ; } else { document . write ( " " + L + " " + R + " " ) ; } }