Please read the new rule regarding the restriction on the use of AI tools. ×

megahertz13's blog

By megahertz13, history, 4 hours ago, In English

Post your code in the comments to get featured.

B. Name Change

Input file: standard input

Output file: standard output

Time limit: 1 second

Memory limit: 256 megabytes

MegaMath Channel is trying to change its name. A new name with no spaces is called valid if it is distinct from "MegaMath Channel" and it is a permutation of the letters (exclude the space) in "MegaMath Channel". For example, "MegaChanneMathl" is a valid new name, while "MegaChanne Mathl" is not (it has a space). Your task is to find whether a given name is valid or not.

Input

The first line contains the number of names t (1 <= t <= 1000).

The next n lines contain a single string n, where n is a possible name.

Output

Output "Yes" if a given name is valid, and output "No" otherwise.

Sample Code by [blank]:

  • Vote: I like it
  • -14
  • Vote: I do not like it

»
3 hours ago, # |
  Vote: I like it +1 Vote: I do not like it

I think you better prepare 100 problems and create a mashup to participate instead. To do this, you need to register to polygon and do create some problems first.

  • »
    »
    3 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I'll turn this into a contest (with different problems). Do you know how to do that?

    • »
      »
      »
      45 minutes ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      bump