#C4024. Alphanumeric Pattern Detection

    ID: 47517 Type: Default 1000ms 256MiB

Alphanumeric Pattern Detection

Alphanumeric Pattern Detection

In this problem, you are given a string S. Your task is to determine the type of alphanumeric pattern present in the string. The string can contain digits and letters. If the string contains only digits, output digits-only. If it contains only letters, output letters-only. If it contains both digits and letters, output alphanumeric. For any other characters, output none.

Note that the check is case-insensitive for letters and the input will be read from the standard input. Your solution must read the input through stdin and write the output to stdout.

inputFormat

The input consists of a single line containing the string S. The length of the string is at least 1 and at most 1000 characters. The string may include spaces or special characters.

outputFormat

Output the pattern type of the string. The output should be one of the following four strings:

  • digits-only if the string consists solely of digits.
  • letters-only if the string consists solely of letters.
  • alphanumeric if the string contains both letters and digits.
  • none if the string contains any other characters.
## sample
12345
digits-only

</p>