#include <iostream>
#include <vector>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> res;
for(int i = 0; i < n; i++){
int x;
cin >> x;
int x1 = x, x2 = x, cnt = 0;
while(x1 > 0){
cnt++;
x1 /= 10;
}
if(cnt % 2 == 1){
int xx = 0, u = 0;
while(x2 > 0){
xx += (x2 % 10) * pow(10,u);
u++;
x2 /= 10;
if(x == xx)
res.push_back(i + 1);
for(auto &i : res)
cout << i << " ";
#include <iostream>
#include <vector>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> res;
for(int i = 0; i < n; i++){
int x;
cin >> x;
int x1 = x, x2 = x, cnt = 0;
while(x1 > 0){
cnt++;
x1 /= 10;
}
if(cnt % 2 == 1){
int xx = 0, u = 0;
while(x2 > 0){
xx += (x2 % 10) * pow(10,u);
u++;
x2 /= 10;
}
if(x == xx)
res.push_back(i + 1);
}
}
for(auto &i : res)
cout << i << " ";
}