97.3% (36/37)

41.5% (51/123)

# Description

Residents of island AHaHa have a special accent. The rule of converting English to their accent is simple:
If a word starts or ends with a vowel, add "ha" after it; if not, reverse that word.

# Input Format

First line of input is an integer $n$, which represents the number of words in the sentence.
The second line contains the sentence (with $n$ words). $(1 \leq n \leq 15)$ and $(1 \leq \text{Word Length} \leq 20)$

# Output Format

A sentence that is converted into accent of island AHaHa.

# Sample Input 1

9
hi my name is cplusplus nice to meet you

# Sample Output 1

hiha ym nameha isha sulpsulpc niceha toha teem youha

# Sample Input 2

9
Hi my name is Cplusplus nice to meet you

# Sample Output 2

Hiha ym nameha isha Sulpsulpc niceha toha teem youha

# Sample Input 3

9
Hi! My name is Cplusplus, nice to meet you.

# Sample Output 3

Hiha! Ym nameha isha Sulpsulpc, niceha toha teem youha.

# Problem Source

No. Testdata Range Constraints Score
1 0~3 All lowercase. (Sample 1) 10
2 0~6 Contains uppercase words. (Sample 2) 8
3 0~9 Contains punctuation marks(, . ! ?) (Sample 3) 2

# Testdata and Limits

No. Time Limit (ms) Memory Limit (KiB) Output Limit (KiB) Subtasks
0 1000 65536 65536 1 2 3
1 1000 65536 65536 1 2 3
2 1000 65536 65536 1 2 3
3 1000 65536 65536 1 2 3
4 1000 65536 65536 2 3
5 1000 65536 65536 2 3
6 1000 65536 65536 2 3
7 1000 65536 65536 3
8 1000 65536 65536 3
9 1000 65536 65536 3