Company: Texas
Difficulty: medium
Circular Divisible by Twelve Given a non-empty string `P` of decimal digits, find the minimum number of left circular rotations needed to make its numeric value divisible by 12. A left rotation moves the first digit to the end. Leading zeroes are permitted when evaluating a rotation. Print `-1` if no rotation is divisible by 12. Input Format The first line contains `T`. Each test case contains one digit string `P`. Output Format For each test case print the minimum number of rotations.