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
36
37
38
39
40
41
42
43
44
45
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<bool> vb;

#define eb emplace_back
#define pb push_back
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rloop(i, a, b) for (int i = a; i >= b; i--)
#define all(x) (x).begin(), (x).end()

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

    vi zakw;

    int n, x, no = 0;
    string s;

    cin >> n;

    while (n-- && zakw.size() < 20)
    {
        no++;
        cin >> s >> x;
        if (s == "NIE")
            continue;

        if (zakw.size() < 10)
            zakw.pb(no);
        else if (x < 2)
            zakw.pb(no);
    }

    for (int elem : zakw)
        cout << elem << ' ';
    return 0;
}