#K68532. Phone Number Validator

    ID: 32885 Type: Default 1000ms 256MiB

Phone Number Validator

Phone Number Validator

This problem requires you to implement a phone number validation function. The phone number must consist of exactly 10 digits, i.e. \( |phone\_number| = 10 \). Moreover, the phone number should not contain any sequence of three or more consecutive identical digits. For example, "1233333456" is invalid because it contains a sequence of three 3's, while "1122334455" is valid.

You are required to implement a function that reads multiple phone numbers from standard input and outputs whether each phone number is "VALID" or "INVALID" based on the criteria above.

inputFormat

The first line of input contains a single integer \( T \) representing the number of test cases. Each of the following \( T \) lines contains a phone number (a string) which needs to be validated.

outputFormat

For each test case, output a single line with either "VALID" or "INVALID" indicating whether the corresponding phone number meets the specified criteria.

## sample
5
1234567890
1122334455
1233333456
1233211234
9988776655
VALID

VALID INVALID VALID VALID

</p>