#include <iostream>
#include <queue>
#include <cstring>
#include <iomanip>
#include <algorithm>
#define ll long long
#define rep(i, j, k) for(int i = j; i <= k; i++)
#define rop(i, j, k) for(int i = j; i >= k; i--)
using namespace std;
const int N = 1e7 + 5;
int n, p[N];
struct dkr_tree{
	int ls[N], rs[N];
	struct poi{
		int a[N], head;
		inline int size(){return head;}
		inline void push(int x){a[++head] = x;}
		inline void pop(){head--;}
		inline int top(){return a[head];}
		inline int query(int x){return a[x];}
	}st;
	inline void build()
	{
		rep(i, 1, n){
			int k = st.size();
			while(st.size() && p[st.top()] >= p[i]) st.pop();
			if(st.size()) rs[st.top()] = i;
			if(st.size() < k) ls[i] = st.query(st.size() + 1);
			st.push(i);
		}	
	}	
}t1;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0), cout.tie(0); 
	cin >> n;
	
	return 0;
}