#include <vector>

using namespace std;

vector<bool> organize_banquet(const vector<int> &Q);

vector<int> find_factions(int N) {
  vector<int> solution(N);

  // Your algorithm here!

  return solution;
}
