#include <cstdio>
#include <cctype>
#include <cstring>
using namespace std;
char str[215], ans[215];
bool check(int x)
{
    char *tgt = "marshtomp";
    for (int i = 0; i < 9; i++)
        if (tolower(str[x + i]) != tgt[i])
            return false;
    return true;
}
int main()
{
    while (fgets(str, 205, stdin))
    {
        int len = strlen(str);
        if (len < 9)
            printf(str);
        else
        {
            int e = 0;
            for (int i = 0; i < len; i++)
                if (!check(i))
                    ans[e++] = str[i];
                else
                    strcpy(ans + e, "fjxmlhx"), e += 7, i += 8;
            ans[e] = '\0';
            printf(ans);
        }
    }
    return 0;
}
