#include "bits/stdc++.h"
using namespace std;
int main(int argc, char* argv[])
{
ios::sync_with_stdio(false); cin.tie(0);
int n;
cin >> n;
vector<int> res;
for (int i = 0; i < n; i++)
{
int time, cellId, callId, gridIdX, gridIdY, rsrp;
cin >> time >> cellId >> callId >> gridIdX >> gridIdY >> rsrp;
if (i % 10 == 0) res.push_back(i + 1);
}
cout<<res.size()<<endl;
for (int i = 0; i < res.size(); i++)
{
cout << res[i] << ' ';
}
cout << endl;
}