/*
 * =====================================================================================
 * 
 *        Filename:  mpdlogparser.cpp
 * 
 *     Description:  
 * 
 *         Version:  1.0
 *         Created:  05/30/2005 09:23:46 PM EDT
 *        Revision:  none
 *        Compiler:  gcc
 * 
 *          Author:   (), 
 *         Company:  
 * 
 * =====================================================================================
 */

#include <vector>
#include <iostream>
#include <string>
using namespace std;


// splits a string according to delimiter.
vector<string> split(string toTokens, char delim) {
    vector<string> tokenArray;
    char c;
    string tmpWord;
    for (int i = 0; i < (signed) toTokens.length(); i++) {
        c = toTokens.at(i);
        if (c == delim) {
            (tokenArray).push_back(tmpWord);
            tmpWord = "";
        } else 
            tmpWord.push_back(c);

    }
    if (tmpWord != "")
        (tokenArray).push_back(tmpWord);
    return tokenArray;
}

int main(int argc, char **argv) {
    vector<string> output;
    string line;
    while (getline(cin, line)) {
        vector<string> split_line = split(line, '*');
        if (split_line.size() > 0) {
            string song = split_line[0];
            for (vector<string>::iterator it = output.begin(); it != output.end(); it++) {
                if (*it == song) {
                    output.erase(it);
                }
            }
            output.push_back(song);
        }
    }
    for (unsigned int i = 0; i < output.size(); i++) {
        cout << output[i] << endl;
    }
}






    
