question link : https://mirror.codeforces.com/problemset/problem/1196/D1 solution link : https://ideone.com/IfLK0U My Logic : if k<=2 checked directly else made all the three possible strings and used brute force to check all three and took minimum of them as the ans. please help