#C11578. Strong Password Permutation

    ID: 40909 Type: Default 1000ms 256MiB

Strong Password Permutation

Strong Password Permutation

Alice has a unique way of creating her passwords. She considers a password strong if it contains at least one vowel and at least one consonant. Given a string of length \( n \) consisting of lowercase English letters, determine whether it is possible to rearrange its characters to form a strong password. If a valid permutation exists, output any strong password; otherwise, print Impossible.

Note: The vowels are defined as \( \{a, e, i, o, u\} \) and the remaining letters are considered consonants.

inputFormat

The input consists of two lines:

  • The first line contains an integer \( n \) representing the length of the string.
  • The second line contains the string \( s \) of length \( n \) made up of lowercase letters.

outputFormat

If it is possible to form a strong password from \( s \) by any permutation, output any valid permutation (a string). Otherwise, output Impossible.

## sample
4
aabc
aabc