#C12842. Repeat by Position

    ID: 42314 Type: Default 1000ms 256MiB

Repeat by Position

Repeat by Position

Given a string s, generate a new string where each character at the i-th position (1-indexed) in the original string is repeated exactly i times. In other words, if the character is at position \( i \), then it should appear \( i \) times consecutively in the resulting string.

For example, if s = "abc", then the first character 'a' is repeated 1 time, 'b' is repeated 2 times, and 'c' is repeated 3 times, making the final string "abbccc".

The formula for repetition is given by: \( \text{result} = \bigoplus_{i=1}^{n} s_i^{\times i} \), where \( s_i^{\times i} \) denotes the character at position \( i \) repeated \( i \) times.

inputFormat

The input is provided via standard input (stdin) and consists of a single line containing the string s. The string may contain spaces and special characters.

outputFormat

Output the transformed string to standard output (stdout) according to the problem description.

## sample
abc
abbccc