#include <iostream>
#include <map>
using namespace std;
int main() {
cin.sync_with_stdio(0);
cin.tie(0);
int N, M;
cin >> N >> M;
map<int, int>MAP;
for (int i = 0; i<N; i++)
{
int tmp;
cin >> tmp;
if (tmp != 0) MAP[tmp] = i+1;
}
for (auto it:MAP)
{
cout << it.second << " ";
}
cout << "\n";
}