You have `n` tiles, each printed with an uppercase letter (given as the string `tiles`). Return the number of distinct non-empty sequences of letters you can make using these tiles.
Example 1
Input:tiles = "AAB"
Output:8
Explanation:A, B, AA, AB, BA, AAB, ABA, BAA.
Constraints
- 1 <= tiles.length <= 7
- tiles consists of uppercase English letters