N people have to sit at a round table,each one representing a company. There are given K pairs of people who belong to competitive companies. Print all the possibilities for those people to sit at the table,so that two people from competitive companies won't stay next to one another.
I don't know how to start. To read those N people,I know it's
But for those K? Because some of those N can have more competitive people(e.g. a might be competitive with a as well as with a),whereas some of them can have no competitive.