6 уникальных строк
["bbaaaabbaaaa", "baaaabbaaaab", "aaaabbaaaabb", "aaabbaaaabba", "aabbaaaabbaa", "abbaaaabbaaa"]
Программа на Ruby 22
s = "abbaaaabbaaa"
a = []
for i in 0..s.size
s = s[1..-1] + s[0..0]
a << s if not a.include?(s)<br>end
p a
p a.size