A new website to host video and music is built up by the company X. The engineers at X are facing a major issue in identifying whether the data they receive in one of their API is of video or music.
Now, you will be given $$N$$ lines of data. Each line of data consists a list of strings. Each string either represents an integer or a name. For each line of data, you need to check whether that data corresponds to a music or a video.
You need to follow the following rules to detect the data and store it:
- A Music data consists of a name and an integer that denote the bitrate and nothing else.
- A video data consists of a name and two integers that denote the resolution of the video and nothing else.
- Rest of the data which does not match any of the formats above is to be ignored.
- A music or a video name can consist of integers but it will contain at least one character of the English alphabets.
- An integer in the data will consist only of integers, and it will never start with 0.
For each line of data, if it satisfies the constraints of a music then print M, if it satisfies constraints of a video print V, or else print N which means that the data has to be ignored.
Input Format
The first line contains an integer $$N$$ as input denoting the total numbers of lines in the input.
Next $$N$$ lines contains either two strings or three strings separated by space.
Output Format
For each data, you need to print either of the three characters N, V or M.
Constraints
$$1 \le N \le 10^5$$
$$1 \le word \le 15$$ where $$word$$ is the name of either music or a video.
$$1 \le bitrate \le 10^{32}$$ where $$bitrate$$ is the bitrate of the song.
$$1 \le res_x , res_y \le 10^{32}$$ where $$res_x$$ and $$res_y$$ denote the width and height of video in pixels.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial