#include #include using namespace __gnu_pbds; template using ordered_multiset = tree, rb_tree_tag, tree_order_statistics_node_update>; using namespace std; #define int long long signed main(){ int N,Q; cin>>N; map>> m; ordered_multiset s,t; for(int i=0;i>ss>>a>>b; b++; m[ss].insert({a,b}); s.insert(a); t.insert(b); } cin>>Q; while(Q--){ int tt; cin>>tt; //cout<>ss>>a>>b; b++; m[ss].insert({a,b}); s.insert(a); t.insert(b); } else if(tt == 1){ string ss; int k; cin>>ss>>k; auto it = m[ss].lower_bound({k+1,-1}); if(m[ss].begin() == it) cout<<"No"<>k; k++; cout<