Bobo is studying encoding to send messages to his best friend, oboB. He recently developed a “Bobo encoding,” which is essentially a binary encoding. However, unlike direct binary encoding, “Bobo encoding” consists of three parts: a “start recognition string”

at the beginning, a “message string”

used to transmit information, and an “end recognition string”

that is identical to the “start recognition string.” Given a “message string”

that needs to be transmitted and a recognition string

, the Bobo encoding of this “message string”

is

, where

indicates string concatenation. When sending information, Bobo encrypts the message string he wants to transmit into “Bobo encoding” and transmits it to oboB one by one. oboB will stop receiving information as soon as he finds the recognition string appearing twice in the received string, indicating that he has received both the “start recognition string“ and the “end recognition string.” Note that the
recognition string can overlap, for example, if the recognition string is

and oboB receives

, oboB will think that the recognition string has appeared twice, and stop receiving information.
Bobo is quite proud of his “Bobo encoding,” but he has no idea that he has made a huge mistake! One day, Bobo wanted to send the message string

to oboB, and they agreed that the recognition string was

. So the “Bobo encoding” of this message string is

. However, oboB found that he had received two recognition strings

after receiving the first

characters

, so he mistakenly took

as the “Bobo encoding.”
Nevertheless, Bobo thinks there must be some way to fix this issue. He wants to know if, given a pattern string

and the length

of the message string to be sent, he can find a suitable message string so that the “Bobo encoding” can be correctly interpreted.
Formally, given a string

consisting only of

s and

s, and a positive integer

, can you find a string

consisting only of

s and

s with a length of

so that

appears only twice in

(only at the beginning and the end)?