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

vector<int> p;

void find_portal(int l, int r, int cnt){
    if(cnt == 0)return;
    if(l == r){
        p.push_back(l); return;
    }
    int m = (l + r) / 2;
    int x = find_portals(l, m);
    int y = cnt - x;
    find_portal(l, m, x);
    find_portal(m + 1, r, y);
}

vector<int> portals(int n, int k){
    find_portal(1, n, k);
    sort(p.begin(), p.end());
    return p;
}

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 {0, 0};
}

pair<int, int> find_end_portal(int L) {
    return {1, 1};
}