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
#include <bits/stdc++.h>
#define vc vector
#define str string

using namespace std;

typedef long long ll;
typedef pair<ll, ll> pll;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    ll n;
    cin >> n;
    vc<ll> res;
    for (ll i = 0; i < n; i++) {
        str s;
        ll x;
        cin >> s >> x;
        if (s == "NIE") continue;
        if (res.size() < 10 || x < 2) {
            res.push_back(i);
        }
        if (res.size() >= 20) break;
    }
    for (ll &x : res) cout << x + 1 << " ";
    cout << '\n';

    
}