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]: