four friends & mdash; Roma (ITSHNIK), Maxim (chemist), Danik (designer) and Vlad (versatile person) & mdash; Created a common chat to exchange memes. In order not to distract each other from work with inappropriate jokes, they decided to write a bot, which will automatically determine the topic of the meme and send it only to the interested person. Your task & mdash; Write a nucleus for this bot.
rn
sorting rules:
you get to the input; line & mdash; This is the text of the meme. The bot must analyze it and determine the category by the availability of certain letters:
rn
rn - it-meme: & nbsp; if The line has all the letters 'b', 'u', 'g' (in any order and quantity). Recipient & mdash; & nbsp; roma .
rn - chemical Mem: & nbsp; if the line has all the letters 'b', 'o', 'o', 'm' (that is, the letter 'o' should meet at least twice). Recipient & mdash; & nbsp; maxim .
rn - designer Mem: & nbsp; if the line has all the letters 'e', 'd', 'i', 't', 's'. Recipient & mdash; & nbsp; danik .
rn - other: & nbsp; if the meme does not fit any of the above categories. Recipient & mdash; & nbsp; vlad .
rn ol> rn key rule (resolution Conflicts):
the meme can fit several categories at the same time. In this case, it must be sent to those whose category "ended" earlier. The category is considered "completed" at the moment when the last of the letters necessary for it is found in the line & nbsp; . The bot must choose a category with the least completion index.
rn you need to write a program that accepts one line (meme) and display the recipient's name.
Input format
One line, which is a 'meme' (type: string).
Output format
Recipient's name (type: string).
Hint
There will be no clue here, decide for yourself!