#C4474. Pulsate Messages Animation
Pulsate Messages Animation
Pulsate Messages Animation
Given a list of messages, your task is to animate each message in a pulsating style. For every message, you need to generate a series of frames such that in the i-th frame (0-indexed), only the i-th character of the message is transformed to uppercase while keeping all other characters unchanged.
This transformation can be mathematically described as:
$$frame_i = s[0:i] + \text{\uppercase}(s[i]) + s[i+1:n]$$
where \(s\) is the input message and \(n\) is its length. Note that the first frame is generated by capitalizing the first letter.
inputFormat
The input is read from stdin
and has the following format:
- The first line contains an integer \(T\) representing the number of messages.
- The following \(T\) lines each contain a single message consisting of English letters.
outputFormat
For each message, output a single line to stdout
containing the animation frames separated by a single space.
1
hello
Hello hEllo heLlo helLo hellO
</p>