#K43812. Unique String Generator

    ID: 27393 Type: Default 1000ms 256MiB

Unique String Generator

Unique String Generator

Given an integer \( n \), generate a string of length \( n \) by concatenating the English alphabet repeatedly in order. Specifically, if \( n \) exceeds 26, then the string is formed by repeating the sequence \( 'abcdefghijklmnopqrstuvwxyz' \) as many times as necessary and appending the first \( r \) letters, where \( r = n \mod 26 \). For example, when \( n = 27 \), the answer is \( 'abcdefghijklmnopqrstuvwxyza' \).

Constraints: \( n \) is a non-negative integer. If \( n = 0 \), output an empty string.

Note: Use the formula:

[ \text{result} = \underbrace{\text{alphabet} + \text{alphabet} + \cdots + \text{alphabet}}_{\lfloor n/26 \rfloor \text{ times}} + \text{alphabet}[0:(n\mod26)] ]

inputFormat

Input is taken from standard input (stdin). The input consists of a single non-negative integer ( n ).

outputFormat

Output the generated string according to the described pattern to standard output (stdout).## sample

1
a