Help with approach

prob: https://hack.codingblocks.com/app/contests/2022/253/problem

will it work if to the orignal string I append the ascii values of the characters of the string and then use then generate all the subsequences

No it will not work
because it will generate a97
b98 ab9798
and maybe more unwanted subseq

This is same as generating all subseq
with three choices
take it as char
take it as ascii
leave it