#C209. Valid Stock Symbol

    ID: 45367 Type: Default 1000ms 256MiB

Valid Stock Symbol

Valid Stock Symbol

You are given a string S representing a candidate stock symbol. A valid stock symbol must satisfy the following conditions:

  • It consists entirely of uppercase English letters.
  • The length of S is between $4$ and $6$ (inclusive).
  • It does not contain any consecutive repeating characters.

Your task is to check whether the given stock symbol is valid and output Valid if it is, or Invalid otherwise.

Note: The input will be provided via standard input and the output must be printed to standard output.

inputFormat

A single line containing the stock symbol as a string.

outputFormat

Print Valid if the stock symbol satisfies all the conditions, otherwise print Invalid.## sample

ABCD
Valid