1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <bits/stdc++.h>

using namespace std;

#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define x first
#define y second

using ll = long long;
using ld = long double;
using pll = pair<ll,ll>;
using vi = vector<int>;

int main() {
    cin.tie(0)->sync_with_stdio(0);

    ll n, cnt = 20;
    cin >> n;
    vector<ll> ans;
    for(int i = 0 ; i < n ; ++i) {
        string s; ll x;
        cin >> s >> x;
        if(cnt > 0) {
            if(s == "NIE") continue;
            if(cnt > 10 || x < 2) {
                cnt--;
                ans.emplace_back(i+1);
            }
        }
    }
    for(auto x : ans) cout << x << ' ';

    return 0;
}