#include <bits/stdc++.h>
#include "minecraft.h"
using namespace std;

vector <int> v;

void f(int l=0, int r=0, int k=0) {
    if (l+k==r) {
        for (int i=l;i<r;i+=1) v.push_back(i);
        return;
    }
    int m=(l+r)/2;
    int k1=find_portals(l, m-1);
    if (k1) f(l, m, k1);
    if (k-k1) f(m, r, k-k1);
}

vector<int> portals(int n, int k) {
    f(1,  n+1, k);
    return v;
}


std::pair<int, int> minimal_danger(int N, std::vector<std::pair<int, std::pair<int, int>>> paths, std::vector<int> portals, std::vector<int> fortresses) {
    return make_pair(0, 0);
}

std::pair<int, int> find_end_portal(int L) {
    return make_pair(0, 0);
}