there safe protect password the password sequence n digits digit range 0 k 1the safe peculiar way check password when enter sequence check recent n digit enter time type digitfor example correct password 345 enter 012345after typing 0 recent 3 digit 0 incorrectafter type 1 recent 3 digit 01 incorrectafter type 2 recent 3 digit 012 incorrectafter type 3 recent 3 digits 123 incorrectafter type 4 recent 3 digit 234 incorrectafter type 5 recent 3 digit 345 correct safe unlocksReturn string minimum length unlock safe point enter Example 1input n 1 k 2output 10explanation the password single digit enter digit 01 unlock safeexample 2input n 2 k 2output 01100explanation for possible password 00 type start 4th digit 01 type start 1st digit 10 type start 3rd digit 11 type start 2nd digitthus 01100 unlock safe 01100 10011 11001 unlock safe Constraints1 n 41 k 101 kn 4096