1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fi first
#define se second
const int N=8005;
int n;
int main(){
	ios::sync_with_stdio(false);cin.tie(0);
	cin >> n;
	vector<int>v;
	for(int i=1; i<=n ;i++){
		string s;int x;cin >> s >> x;
		if(s[0]=='N') continue;
		if(v.size()<10) v.push_back(i);
		else if(v.size()<20 && x<2) v.push_back(i);
	}
	for(auto c:v) cout << c << ' ';
	cout << '\n';
}