#C961. Email Address Validation

    ID: 53722 Type: Default 1000ms 256MiB

Email Address Validation

Email Address Validation

You are given a list of email addresses. Your task is to validate each email address based on the following rules:

  1. The email must start with an alphabetic character.
  2. It must contain exactly one @ symbol.
  3. The domain (i.e. the part after the @) must be at least two characters long. Furthermore, if the domain contains a dot, the segment after the last dot must be at least two characters long (i.e. \(\ge 2\)).
  4. The email cannot contain any spaces or special characters other than ., _, and -.

For each email address, output True if it satisfies all the rules, and False otherwise.

inputFormat

The first line of input contains an integer \(n\) denoting the number of email addresses. Each of the next \(n\) lines contains one email address.

outputFormat

For each email address, print True or False on a separate line indicating whether the email address is valid.

## sample
3
john.doe@domain.com
1invalid@domain.com
alice@site
True

False True

</p>