#C7237. Trip Classification
Trip Classification
Trip Classification
You are given a list of trip plans. Each trip plan is a string consisting of the characters H, W, and C. A trip is defined as Diverse if it contains either of the substrings \(HWC\) or \(CHW\); otherwise, it is classified as Monotonous.
Your task is to classify each given trip plan based on the criteria above.
Note: The input will be read from stdin
and output should be printed to stdout
.
inputFormat
The first line contains an integer \(N\), representing the number of trip plans. Each of the next \(N\) lines contains a non-empty string that represents a trip plan, composed solely of the characters H
, W
, and C
.
outputFormat
For each trip plan, output a single line containing Diverse
if the trip contains either substring \(HWC\) or \(CHW\) and Monotonous
otherwise.
3
HWC
CHW
HWHWWWCCC
Diverse
Diverse
Monotonous
</p>