P16604 [SYSUCPC 2025] SYSU III
Description
As you all know, you are participating in the SYSUCPC (SYSU Constructive Problem Contest) finals. Undoubtedly, the Constructive Kingdom of Sun Yat-sen University is eager for you to tackle some related problems.
Given a string $S$ containing only lowercase letters, determine the maximum number of disjoint subsequences of length $4$ that can be formed, such that all subsequences are $\texttt{sysu}$. Formally, a subsequence of a string $S$ is a subset of characters of $S$ that read from left to right.
A greedy algorithm is currently used: each time, starting from the end, an unused $\texttt{u}$ is considered, and it is matched with nearest unused $\texttt{s,y,s}$ sequentially to form a qualified subsequence, which is then removed.
You are now requested to provide a string $S$ such that the answer obtained by the greedy method is $x$, while the correct answer is $y$. If no such $S$ exists, output $-1$.
Input Format
The only line contains two integers $x,y(1\leq x,y\leq 10^5)$.
Output Format
A string $S$ such that the answer obtained by the greedy method is $x$, while the correct answer is $y$. If no such $S$ exists, output $-1$. The length of $S$ must not exceed $4\times 10^5$.