|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||512 MB||4||3||3||75.000%|
Returning to the Beautiful Gloomy Outback (BGO) after a strenuous trip to the city, you hear a faint howl in the distance. Instantly you realize it is your friend Fenrir inviting you to a howling contest.
In order to make an impressive howl that wins the contest, you know that your howl must fulfill the following criteria in order to be valid:
W. Each letter must occur at least once.
W’s, or two consecutive
Hfollowed immediately by a
Aafter the first occurrence of an
Can you produce a longer howl than Fenrir and win the contest?
The first and only line of input contains a single word, the howl of Fenrir. Since Fenrir is a proper wolf, his howls are always valid. Writing down Fenrir’s howl will require at most 1 MB of computer memory.
A valid howl which will win the howling contest.