for(I = 0; I < = 2; i++){
for(j = 0; j & lt=2; j++){
for(k = 0; k & lt=2; k++){
If (me! = j & amp& ampj! = k & amp& ampk! =i){// Eliminate duplicate opponents.
If (me! = 0 & amp& ampk! = 0 & amp& ampk! =2){// Meet the topic conditions.
//Output A's opponent
system . out . println(" a:"+(char)(' x '+I));
//Output B's opponent
system . out . println(" b:"+(char)(' x '+j));
//the opponent who outputs C.
system . out . println(" c:"+(char)(' x '+k));
}
}
}
}
}