Fake Emails
Description
Your friend from Silicon Valley, Michael, has just founded his very first start-up. He and a team of developers have developed a website for the world to see. And like all mediocre websites, accounts are required. Michael, however, has seen a problem with this feature. The "email" field of the sign-up page is easily exploitable. People have tried to insert fake emails so they don't have Michael's newsletter in their inboxes. Luckily, Michael has you to solve this problem.
For reference, a valid email is considered a non-empty string of alphanumeric characters (uppercase letters, lowercase letters, numbers, underscores) following by an "at" sign (@), following by another non-empty string of alphanumeric characters and finally, an ending of .com, .net, or .org.
Input
The first line of input contains a single integer, , denoting the number of email to be tested. The next lines each contain a single email to be tested. Note that some emails may contain whitespace, although whitespace is not allowed in a valid email.
Output
For each email that is tested, output a line containing Valid if the email is valid, or a line containing Invalid otherwise.
Sample Input
8
[email protected]
[email protected]
[email protected]
@g.com
a@_.com
let me try to break this @a.com
[email protected]
[email protected]
Sample Output
Valid
Invalid
Invalid
Invalid
Valid
Invalid
Invalid
Valid