cho.sh
Notes
Loading...

Ideal String

Time limit

2s

Memory limit

128 MB

Problem

Count positions in a string starting from 1. A string is ideal if, for every character in the string, the total number of times that character appears is equal to the position where it first appears.

For example, BAOOOA is an ideal string. B first appears at position 1 and appears 1 time in total. A first appears at position 2 and appears 2 times in total. O first appears at position 3 and appears 3 times in total.

Given the length N, print the lexicographically smallest ideal string of length N. If no such string exists, print -1.

Input

The first line contains a natural number N. (1 <= N <= 100)

Output

Print the answer string on one line.