Given S1 and a T/F string S2, generate the lexicographically smallest string of length L1+L2-1 where S1 appears at index i iff S2[i] is T, else -1.
Asked in the OA stage. Return "-1" if the constraints are inconsistent. The output must contain lowercase English letters.
Implement build_string(s1, s2). s1 is the required substring and s2 contains one character per possible starting index. Return the lexicographically smallest valid string, or "-1" when none exists.
def build_string(s1, s2):