Output not according to the statement

In the case
qwerty asdfgh qazxsw
qas

the anser given is qazxsw , which is not a substring. Please clarify

@pswaldia1
hello pradeep ,
image
qazxs is smallest length substring that contains all character of string qas thats why answer is qazxs

Ok. I got it . Thanks