TASK DEFINITION: You are given a password and you need to generate the number of steps required to convert the given password to a strong password. A password is considered strong if (a) it has at least 6 characters and at most 20 characters; (b) it contains at least one lowercase letter and one uppercase letter, and at least one digit; (c) it does not contain three repeating characters in a row. In one step you can: (1) Insert one character to password, (2) delete one character from password, or (3) replace one character of password with another character.
PROBLEM: password = 8S5!D

SOLUTION: 1

PROBLEM: password = 4lx4BxhKkvj

SOLUTION: 0

PROBLEM: password = TBKrDPo9iTs8UlGvxQAT7yMLvfBdyrBaEj8NBP

SOLUTION:
18