#include <iostream>
#include <sstream>
#include <string>
using namespace std;

int main(){
    string s, w, a[101];
    getline(cin, s);
    stringstream ss(s);
    
    while(ss >> w)
        for (int i = 0; i < w.size(); i++) 
            if (isdigit(w[i])) {
                int p = (w[i] - 'o';
                w.erase(i, 1);
                a[p] = w;
                break;
            }
    
    for(int i = 1;i <= 100; i++)
       if(arr[i] != "") cout << a[i]<<" ";
       
    return 0;
}