You are given two integers N and K. Find a string S that satisfies both conditions below.
- S has length N and uses only the letters 'A' and 'B'.
- Exactly K pairs (i,j) satisfy 0≤i<j<N, character i of S is 'A', and character j of S is 'B'. Positions are counted from 0.
If more than one string satisfies both conditions, find the lexicographically smallest one. In lexicographic order 'A' comes before 'B'.