#K48282. Username Validation

    ID: 28386 Type: Default 1000ms 256MiB

Username Validation

Username Validation

You are given a username string and your task is to validate it according to the following rules:

  • The username must contain only lowercase English letters (a-z).
  • The length of the username must satisfy \(6 \leq |username| \leq 15\).
  • The username must not contain three consecutive identical characters.
  • The username must not contain any sequence of 4 characters that are in strictly increasing (e.g., abcd) or decreasing (e.g., dcba) order.

If the username meets all the above conditions, output Valid; otherwise, output Invalid.

inputFormat

Input is read from standard input.

The input consists of a single line containing the username string.

outputFormat

Output to standard output a single line: either Valid or Invalid depending on whether the username satisfies all the rules.

## sample
johnsmith
Valid