#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
    freopen("champ.in", "r", stdin);
    freopen("champ.out", "w", stdout);
    int n;
    cin >> n;
    vector<pair<string, int> > a(n);
    for (int i = 0; i < n; i++)
    {
        cin >> a[i].first;
        a[i].second = i + 1;
    }
    stable_sort(a.begin(), a.end());
    for (int i = 0; i < n; i++)
        cout << a[i].second << "\n";
}