#K50677. Mystic Sequence Checker
Mystic Sequence Checker
Mystic Sequence Checker
You are given a string s representing a sequence of digits. A sequence is called mystic if and only if it has exactly 10 characters and contains every digit from 0 to 9 exactly once. In other words, the sequence must be a permutation of the digits 0, 1, 2, ..., 9.
Mathematically, if we denote the sequence as s, then it is mystic if:
$$|s|=10 \quad \text{and} \quad \{s_i:\, 1 \le i \le 10\}=\{0,1,2,3,4,5,6,7,8,9\}.$$
Your task is to check whether the given sequence is mystic or not.
inputFormat
The input consists of a single line containing a string of digits. The string may or may not have exactly 10 characters.
outputFormat
Print a single word: "Valid" if the sequence is mystic (i.e. it has 10 characters and contains every digit from 0 to 9 exactly once), and "Invalid" otherwise.## sample
1234567890
Valid