You are given a string S built from the letters a, b, and c only. Count the subsequences of S that have the form aibjck, where i≥1, j≥1, and k≥1.
aibjck is the string with i copies of a, then j copies of b, then k copies of c. For example, a2b3c1 is aabbbc and a3b1c6 is aaabcccccc.
A subsequence is what remains after deleting zero or more characters of S and keeping the rest in their original order. Two subsequences that use different sets of positions count separately, even when the remaining strings are equal.