Given a list of strings words, group the indices of words that are rotations of each other. Two strings a and b are rotationally equivalent if b can be obtained by rotating a (cyclic shift). Return a list of groups, where each group is a list of 0-based indices of words that are rotations of one another. Each group should have its indices sorted in ascending order. The list of groups should be sorted by the smallest index in each group (i.e., by groups' first elements). Strings of different lengths cannot be rotations of each other and should not be grouped together. All words should appear in exactly one group (singletons are allowed when a word has no rotational matches).
(["abc", "bca", "cab", "abcd", "dabc", "xyz"],)[[0, 1, 2], [3, 4], [5]]