#include <iostream>
#include <vector>
using namespace std;

int find_portals(int l, int r);
string throw_eye(pair<int, int> coordinates);
vector<int> portals(int n, int k);
pair<int,int> minimal_danger(int n, vector<pair<int, pair<int,int>>> paths, vector<int> portals, vector<int> fortresses);
pair<int,int> find_end_portal(int L);