#C5600. Standardize Phone Number Format

    ID: 49268 Type: Default 1000ms 256MiB

Standardize Phone Number Format

Standardize Phone Number Format

Given a string representing a phone number that contains exactly 10 digits among other possible non-digit characters, reformat the phone number into the standard U.S. format: \((XXX)\) XXX-XXXX. The original string may include various delimiters such as spaces, dashes, dots, or other non-digit characters. Your program should extract the digits and print the formatted phone number.

For example, if the input is "123-456-7890" or "(123)456-7890", the output must be "(123) 456-7890".

Note: The standard format is defined by the formula \( (d_1d_2d_3)\ d_4d_5d_6-d_7d_8d_9d_10 \).

inputFormat

The input is read from the standard input (stdin). It consists of a single line containing a string which includes exactly 10 digits mixed with possible non-digit characters.

outputFormat

The output should be printed to the standard output (stdout) and must be the phone number formatted as \((XXX)\) XXX-XXXX.

## sample
1234567890
(123) 456-7890