Printing values in row order from dictionary/ list - python

Could someone show me how to get the values from a dictionary in row order (STARTING FROM SECOND ROW) e.g. get the first value from all rows, when rows finish, move onto getting the second value from all rows until all the values have been collected (when no more columns).
E.g. here is a table:
('E', 'K', 'Y') # <- don't get the values from the first row
('B', 'C', 'B') # start getting values from this (second row)
('C', 'B', 'F')
('F', 'C', 'A')
('C', 'C', 'C')
('B', 'C', 'B')
('E', 'B', 'F')
('B', 'B', 'F')
('D', 'A', 'A')
('A', 'D', 'F')
The table above should print the values:
BCFCBEBDACBCCCBBADBFACBFFAF
Creating an encode and decoder program. stuck with printing values in correct order.
Thanks.

If you have all the tuples in a list you can use zip and join :
>>> l=[('E', 'K', 'Y') ,('B', 'C', 'B') ,('C', 'B', 'F'),('F', 'C', 'A'),('C', 'C', 'C'),('B', 'C', 'B'),('E', 'B', 'F'),('B', 'B', 'F'),('D', 'A', 'A')]
>>> ''.join([''.join(i) for i in zip(*l[1:])])
'BCFCBEBDCBCCCBBABFACBFFA'

Alterantive way, that gets a list of characters instead of str:
print([v for r in (row for row in zip(*l[1:])) for v in r])
#['B', 'C', 'F', 'C', 'B', 'E', 'B', 'D', 'A', 'C', 'B', 'C', 'C', 'C', 'B', 'B', 'A', 'D', 'B', 'F', 'A', 'C', 'B', 'F', 'F', 'A', 'F']

If the data structure is a list of tuples, meaning:
l =[('C', 'B', 'F'),
('F', 'C', 'A'),
('C', 'C', 'C'),
('B', 'C', 'B'),
('E', 'B', 'F'),
('B', 'B', 'F'),
('D', 'A', 'A'),
('A', 'D', 'F')]
Something like this could solve the problem:
string = ""
for i in range(3):
for element in range(1, len(l)):
string+=l[element][i]

Related

How can I rearrange a set of values into new pattern on python and print results

so I will do my best to explain what I'm looking for,
at the moment I have a 100 item list that I want to repetitively shuffle using a set pattern to first check if the pattern will eventually bring me back to where I began
and 2 to print the result of each loop to a text file.
so using a 3 item list as my example
[a,b,c]
and the shuffle pattern [3 1 2]
where the 3rd item becomes the first.
the first item becomes the second
and the second item becomes the 3rd
on a loop would generate the following patterns
[a,b,c]
[3,1,2]
[c,a,b]
[b,c,a]
[a,b,c]
but I have a list at the moment of 100 items that I need to find every single arrangement for a few different patterns I would like to test out.
does anyone know of a way to do this in python please.
You can define function and call this function multi times like below:
>>> def func(lst, ptr):
... return [lst[idx-1] for idx in ptr]
>>> lst = ['a','b','c']
>>> ptr = [3,1,2]
>>> for _ in range(5):
... lst = func(lst, ptr)
... print(lst)
['c', 'a', 'b']
['b', 'c', 'a']
['a', 'b', 'c']
['c', 'a', 'b']
['b', 'c', 'a']
You could use numpy advanced integer indexing if your list contains a numeric type:
import numpy as np
original_list=[1,2,3]
numpy_array = np.array(original_list)
pattern = [2,1,0]
print(numpy_array[pattern])
>>> array([3, 2, 1])
def rearrange(pattern : list,L:list):
new_list = []
for i in pattern :
new_list.append(L[i-1])
return new_list
print(rearrange([3,1,2],['a','b','c']))
output :
['c', 'a', 'b']
Itertools could be what you need.
import itertools
p = itertools.permutations(['a','b','c', 'd'])
list(p)
Output:
[('a', 'b', 'c', 'd'),
('a', 'b', 'd', 'c'),
('a', 'c', 'b', 'd'),
('a', 'c', 'd', 'b'),
('a', 'd', 'b', 'c'),
('a', 'd', 'c', 'b'),
('b', 'a', 'c', 'd'),
('b', 'a', 'd', 'c'),
('b', 'c', 'a', 'd'),
('b', 'c', 'd', 'a'),
('b', 'd', 'a', 'c'),
('b', 'd', 'c', 'a'),
('c', 'a', 'b', 'd'),
('c', 'a', 'd', 'b'),
('c', 'b', 'a', 'd'),
('c', 'b', 'd', 'a'),
('c', 'd', 'a', 'b'),
('c', 'd', 'b', 'a'),
('d', 'a', 'b', 'c'),
('d', 'a', 'c', 'b'),
('d', 'b', 'a', 'c'),
('d', 'b', 'c', 'a'),
('d', 'c', 'a', 'b'),
('d', 'c', 'b', 'a')]
​

Filter List of Tuples to Exclude from Another List of Tuples which Contains

(Using Python3)
I have a list of tuples, (of strings)
have = [
('a', 'b', 'c', 'd'), ('a', 'b', 'c', 'e'), ('a', 'b', 'c', 'f'), ('a', 'b', 'c', 'g'), ('a', 'b', 'd', 'e'),
('a', 'b', 'd', 'f'), ('a', 'b', 'd', 'g'), ('a', 'b', 'e', 'f'), ('a', 'b', 'e', 'g'), ('a', 'b', 'f', 'g'),
('a', 'c', 'd', 'e'), ('a', 'c', 'd', 'f'), ('a', 'c', 'd', 'g'), ('a', 'c', 'e', 'f'), ('a', 'c', 'e', 'g'),
('a', 'c', 'f', 'g'), ('a', 'd', 'e', 'f'), ('a', 'd', 'e', 'g'), ('a', 'd', 'f', 'g'), ('a', 'e', 'f', 'g'),
('b', 'c', 'd', 'e'), ('b', 'c', 'd', 'f'), ('b', 'c', 'd', 'g'), ('b', 'c', 'e', 'f'), ('b', 'c', 'e', 'g'),
('b', 'c', 'f', 'g'), ('b', 'd', 'e', 'f'), ('b', 'd', 'e', 'g'), ('b', 'd', 'f', 'g'), ('b', 'e', 'f', 'g'),
('c', 'd', 'e', 'f'), ('c', 'd', 'e', 'g'), ('c', 'd', 'f', 'g'), ('c', 'e', 'f', 'g'), ('d', 'e', 'f', 'g')
]
I also have a list of tuples (also strings) which I want to "exclude"
exclude = [('a', 'd'), ('b', 'c')]
I'm trying to find an efficient way to remove any element in have that contains both the elements in each exclude tuple. Ordering does not matter.
My goal is to return something like this:
[
('a', 'b', 'e', 'f'), ('a', 'b', 'e', 'g'), ('a', 'b', 'f', 'g'), ('a', 'c', 'e', 'f'), ('a', 'c', 'e', 'g'),
('a', 'c', 'f', 'g'), ('a', 'e', 'f', 'g'), ('b', 'd', 'e', 'f'), ('b', 'd', 'e', 'g'), ('b', 'd', 'f', 'g'),
('b', 'e', 'f', 'g'), ('c', 'd', 'e', 'f'), ('c', 'd', 'e', 'g'), ('c', 'd', 'f', 'g'), ('c', 'e', 'f', 'g'),
('d', 'e', 'f', 'g')
]
You could convert the exclude tuples to sets and then check for each element of have is the excluded set isn't a subset of it:
excludeSet = [set(e) for e in exclude]
filteredHave = [h for h in have if not any(e for e in excludeSet if e.issubset(h))]

Creating combination on list values

I have a requirement where say i have a list
lis = ['a','b','c','d','e','f']
I have to now create a combination of them eg:
l1 = [a],['b,c,d,e,f]
l2: [b],[a,c,d,e,f]
.
.
l10 [a,b,c],[d,e,f]
.
l11 [a,b,c,d] [e,f]
The repeated elements on the left and right nodes will be removed:
eg: i don't need two lists as:
l1: [b,c] , [a,d,e,f]
l2: [a,d,e,f], [b,c]
Since they are the same
The pseudo code i have in mind is:
for length = 1, i will take one element from list and club others
similar for length=2, will take two element and club others
till length=len(list)-1, will do the clubbing
and then later remove the duplicates.
Any better solution i could try?
This may no be optimal, but is very straightforward:
from itertools import chain, combinations
def power_set(iterable):
"""power_set([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)"""
source = list(iterable)
return chain.from_iterable(combinations(source, r) for r in range(1, len(source) // 2 + 1))
def complement(source, universe):
return tuple(set(universe) - set(source))
lst = ['a', 'b', 'c', 'd', 'e', 'f']
result = set(frozenset({si, complement(si, lst)}) for si in power_set(lst))
for s, c in result:
print(s, c)
Output
('a', 'd', 'e') ('f', 'c', 'b')
('f', 'a', 'c', 'b') ('d', 'e')
('b', 'e') ('d', 'f', 'a', 'c')
('a', 'b', 'f') ('d', 'e', 'c')
('e', 'd', 'a', 'f', 'b') ('c',)
('c', 'f') ('d', 'a', 'e', 'b')
('d', 'f') ('a', 'e', 'b', 'c')
('d',) ('e', 'c', 'a', 'f', 'b')
('f', 'a', 'e', 'c') ('b', 'd')
('e', 'c', 'd', 'a', 'b') ('f',)
('b', 'c', 'd') ('f', 'a', 'e')
('a', 'b', 'e') ('d', 'f', 'c')
('b', 'c') ('d', 'f', 'a', 'e')
('f', 'a', 'b') ('c', 'd', 'e')
('d', 'e', 'b', 'c') ('a', 'f')
('c', 'd', 'f') ('a', 'e', 'b')
('e', 'c', 'd', 'f', 'b') ('a',)
('a', 'c') ('d', 'f', 'e', 'b')
('f', 'e', 'c') ('a', 'b', 'd')
('a', 'd') ('f', 'e', 'b', 'c')
('b', 'c', 'e') ('d', 'f', 'a')
('a', 'c', 'e') ('d', 'f', 'b')
('d', 'e', 'f') ('a', 'c', 'b')
('a', 'c', 'd') ('f', 'e', 'b')
('d', 'f', 'e', 'c') ('a', 'b')
('f', 'a', 'e', 'b') ('c', 'd')
('d', 'a', 'c') ('b', 'e', 'f')
('a', 'e') ('d', 'f', 'c', 'b')
('a', 'b', 'c') ('d', 'f', 'e')
('a', 'd', 'f') ('e', 'b', 'c')
('d', 'e', 'b') ('a', 'c', 'f')
('c', 'd', 'a', 'f', 'b') ('e',)
('b',) ('e', 'c', 'd', 'a', 'f')
('e', 'f') ('d', 'a', 'c', 'b')
('d', 'c', 'b') ('a', 'e', 'f')
('b', 'f') ('d', 'a', 'e', 'c')
('d', 'a', 'e') ('b', 'c', 'f')
('b', 'd', 'e') ('f', 'a', 'c')
('a', 'e', 'c') ('b', 'd', 'f')
('c', 'e') ('d', 'f', 'a', 'b')
('d', 'a', 'b') ('c', 'e', 'f')

How to make generator work in spark mapPartitions()?

I am trying to use mapPartiton in spark to process large text corpus:
Let's say we have some half-processed data that looks like this:
text_1 = [['A', 'B', 'C', 'D', 'E'],
['F', 'E', 'G', 'A', 'B'],
['D', 'E', 'H', 'A', 'B'],
['A', 'B', 'C', 'F', 'E'],
['A', 'B', 'C', 'J', 'E'],
['E', 'H', 'A', 'B', 'C'],
['E', 'G', 'A', 'B', 'C'],
['C', 'F', 'E', 'G', 'A'],
['C', 'D', 'E', 'H', 'A'],
['C', 'J', 'E', 'H', 'A'],
['H', 'A', 'B', 'C', 'F'],
['H', 'A', 'B', 'C', 'J'],
['B', 'C', 'F', 'E', 'G'],
['B', 'C', 'D', 'E', 'H'],
['B', 'C', 'F', 'E', 'K'],
['B', 'C', 'J', 'E', 'H'],
['G', 'A', 'B', 'C', 'F'],
['J', 'E', 'H', 'A', 'B']]
Each letter is a word. I also have vocabulary :
V = ['D','F','G','C','J','K']
text_1RDD = sc.parallelize(text_1)
and I want to run the following in spark:
filtered_lists = text_1RDD.mapPartitions(partitions)
filtered_lists.collect()
I have this function:
def partitions(list_of_lists,vc):
for w in vc:
iterator = []
for sub_list in list_of_lists:
if w in sub_list:
iterator.append(sub_list)
yield (w,len(iterator))
If I run it like this:
c = partitions(text_1,V)
for item in c:
print(item)
it returns correct count
('D', 4)
('F', 7)
('G', 5)
('C', 15)
('J', 5)
('K', 1)
However, I have no idea how to run it in spark:
filtered_lists = text_1RDD.mapPartitions(partitions)
filtered_lists.collect()
It has just one argument and generates a lot of errors when running in Spark...
But even if I code vocabulary inside partitions function:
def partitionsV(list_of_lists):
vc = ['D','F','G','C','J','K']
for w in vc:
iterator = []
for sub_list in list_of_lists:
if w in sub_list:
iterator.append(sub_list)
yield (w,len(iterator))
..I got this:
filtered_lists = text_1RDD.mapPartitions(partitionsV)
filtered_lists.collect()
output:
[('D', 2),
('F', 0),
('G', 0),
('C', 0),
('J', 0),
('K', 0),
('D', 0),
('F', 0),
('G', 0),
('C', 0),
('J', 0),
('K', 0),
('D', 1),
('F', 0),
('G', 0),
('C', 0),
('J', 0),
('K', 0),
('D', 1),
('F', 0),
('G', 0),
('C', 0),
('J', 0),
('K', 0)]
Obviously, generator didn't work as expected. I am totally stuck.
I am very new to spark. I would be so grateful if someone can explain to me what is going on here...
That's yet another word-count problem, and mapPartitions is not the tool for the job:
from operator import add
v = set(['D','F','G','C','J','K'])
result = text_1RDD.flatMap(v.intersection).map(lambda x: (x, 1)).reduceByKey(add)
And the result is
for x in result.sortByKey().collect():
print(x)
('C', 15)
('D', 4)
('F', 7)
('G', 5)
('J', 5)
('K', 1)

Python: How to generate list of every possible permutation of three characters given a length? [duplicate]

This question already has answers here:
Generating permutations with repetitions
(6 answers)
Closed 7 years ago.
Say I have a string "ABC"
I'd like to iterate over every possibility of the characters 'A', 'B' and 'C' in a string 5 characters long.
Desired output:
['A', 'A', 'A', 'A', 'A' ]
['A', 'A', 'A', 'A', 'B' ]
...
['C', 'C', 'C', 'C', 'C' ]
I tried using [x for x in itertools.permutations('ABC', r=5)] but it just returns an empty list.
You need itertools.product :
>>> list(product('ABC',repeat=5))
[('A', 'A', 'A', 'A', 'A'), ('A', 'A', 'A', 'A', 'B'), ('A', 'A', 'A', 'A', 'C'), ('A', 'A', 'A', 'B', 'A'), ('A', 'A', 'A', 'B', 'B'), ('A', 'A', 'A', 'B', 'C'), ('A', 'A', 'A', 'C', 'A'), ('A', 'A', 'A', 'C', 'B'), ('A', 'A', 'A', 'C', 'C'), ('A', 'A', 'B', 'A', 'A'), ('A', 'A', 'B', 'A', 'B'), ('A', 'A', 'B', 'A', 'C'), ('A', 'A', 'B', 'B', 'A'), ('A', 'A', 'B', 'B', 'B'), ('A', 'A', 'B', 'B', 'C'), ('A', 'A', 'B', 'C', 'A'), ('A', 'A', 'B', 'C', 'B'), ('A', 'A', 'B', 'C', 'C'), ('A', 'A', 'C', 'A', 'A'), ('A', 'A', 'C', 'A', 'B'), ('A', 'A', 'C', 'A', 'C'), ('A', 'A', 'C', 'B', 'A'), ('A', 'A', 'C', 'B', 'B'), ('A', 'A', 'C', 'B', 'C'), ('A', 'A', 'C', 'C', 'A'), ('A', 'A', 'C', 'C', 'B'), ('A', 'A', 'C', 'C', 'C'), ('A', 'B', 'A', 'A', 'A'), ('A', 'B', 'A', 'A', 'B'), ('A', 'B', 'A', 'A', 'C'), ('A', 'B', 'A', 'B', 'A'), ('A', 'B', 'A', 'B', 'B'), ('A', 'B', 'A', 'B', 'C'), ('A', 'B', 'A', 'C', 'A'), ('A', 'B', 'A', 'C', 'B'), ('A', 'B', 'A', 'C', 'C'), ('A', 'B', 'B', 'A', 'A'), ('A', 'B', 'B', 'A', 'B'), ('A', 'B', 'B', 'A', 'C'), ('A', 'B', 'B', 'B', 'A'), ('A', 'B', 'B', 'B', 'B'), ('A', 'B', 'B', 'B', 'C'), ('A', 'B', 'B', 'C', 'A'), ('A', 'B', 'B', 'C', 'B'), ('A', 'B', 'B', 'C', 'C'), ('A', 'B', 'C', 'A', 'A'), ('A', 'B', 'C', 'A', 'B'), ('A', 'B', 'C', 'A', 'C'), ('A', 'B', 'C', 'B', 'A'), ('A', 'B', 'C', 'B', 'B'), ('A', 'B', 'C', 'B', 'C'), ('A', 'B', 'C', 'C', 'A'), ('A', 'B', 'C', 'C', 'B'), ('A', 'B', 'C', 'C', 'C'), ('A', 'C', 'A', 'A', 'A'), ('A', 'C', 'A', 'A', 'B'), ('A', 'C', 'A', 'A', 'C'), ('A', 'C', 'A', 'B', 'A'), ('A', 'C', 'A', 'B', 'B'), ('A', 'C', 'A', 'B', 'C'), ('A', 'C', 'A', 'C', 'A'), ('A', 'C', 'A', 'C', 'B'), ('A', 'C', 'A', 'C', 'C'), ('A', 'C', 'B', 'A', 'A'), ('A', 'C', 'B', 'A', 'B'), ('A', 'C', 'B', 'A', 'C'), ('A', 'C', 'B', 'B', 'A'), ('A', 'C', 'B', 'B', 'B'), ('A', 'C', 'B', 'B', 'C'), ('A', 'C', 'B', 'C', 'A'), ('A', 'C', 'B', 'C', 'B'), ('A', 'C', 'B', 'C', 'C'), ('A', 'C', 'C', 'A', 'A'), ('A', 'C', 'C', 'A', 'B'), ('A', 'C', 'C', 'A', 'C'), ('A', 'C', 'C', 'B', 'A'), ('A', 'C', 'C', 'B', 'B'), ('A', 'C', 'C', 'B', 'C'), ('A', 'C', 'C', 'C', 'A'), ('A', 'C', 'C', 'C', 'B'), ('A', 'C', 'C', 'C', 'C'), ('B', 'A', 'A', 'A', 'A'), ('B', 'A', 'A', 'A', 'B'), ('B', 'A', 'A', 'A', 'C'), ('B', 'A', 'A', 'B', 'A'), ('B', 'A', 'A', 'B', 'B'), ('B', 'A', 'A', 'B', 'C'), ('B', 'A', 'A', 'C', 'A'), ('B', 'A', 'A', 'C', 'B'), ('B', 'A', 'A', 'C', 'C'), ('B', 'A', 'B', 'A', 'A'), ('B', 'A', 'B', 'A', 'B'), ('B', 'A', 'B', 'A', 'C'), ('B', 'A', 'B', 'B', 'A'), ('B', 'A', 'B', 'B', 'B'), ('B', 'A', 'B', 'B', 'C'), ('B', 'A', 'B', 'C', 'A'), ('B', 'A', 'B', 'C', 'B'), ('B', 'A', 'B', 'C', 'C'), ('B', 'A', 'C', 'A', 'A'), ('B', 'A', 'C', 'A', 'B'), ('B', 'A', 'C', 'A', 'C'), ('B', 'A', 'C', 'B', 'A'), ('B', 'A', 'C', 'B', 'B'), ('B', 'A', 'C', 'B', 'C'), ('B', 'A', 'C', 'C', 'A'), ('B', 'A', 'C', 'C', 'B'), ('B', 'A', 'C', 'C', 'C'), ('B', 'B', 'A', 'A', 'A'), ('B', 'B', 'A', 'A', 'B'), ('B', 'B', 'A', 'A', 'C'), ('B', 'B', 'A', 'B', 'A'), ('B', 'B', 'A', 'B', 'B'), ('B', 'B', 'A', 'B', 'C'), ('B', 'B', 'A', 'C', 'A'), ('B', 'B', 'A', 'C', 'B'), ('B', 'B', 'A', 'C', 'C'), ('B', 'B', 'B', 'A', 'A'), ('B', 'B', 'B', 'A', 'B'), ('B', 'B', 'B', 'A', 'C'), ('B', 'B', 'B', 'B', 'A'), ('B', 'B', 'B', 'B', 'B'), ('B', 'B', 'B', 'B', 'C'), ('B', 'B', 'B', 'C', 'A'), ('B', 'B', 'B', 'C', 'B'), ('B', 'B', 'B', 'C', 'C'), ('B', 'B', 'C', 'A', 'A'), ('B', 'B', 'C', 'A', 'B'), ('B', 'B', 'C', 'A', 'C'), ('B', 'B', 'C', 'B', 'A'), ('B', 'B', 'C', 'B', 'B'), ('B', 'B', 'C', 'B', 'C'), ('B', 'B', 'C', 'C', 'A'), ('B', 'B', 'C', 'C', 'B'), ('B', 'B', 'C', 'C', 'C'), ('B', 'C', 'A', 'A', 'A'), ('B', 'C', 'A', 'A', 'B'), ('B', 'C', 'A', 'A', 'C'), ('B', 'C', 'A', 'B', 'A'), ('B', 'C', 'A', 'B', 'B'), ('B', 'C', 'A', 'B', 'C'), ('B', 'C', 'A', 'C', 'A'), ('B', 'C', 'A', 'C', 'B'), ('B', 'C', 'A', 'C', 'C'), ('B', 'C', 'B', 'A', 'A'), ('B', 'C', 'B', 'A', 'B'), ('B', 'C', 'B', 'A', 'C'), ('B', 'C', 'B', 'B', 'A'), ('B', 'C', 'B', 'B', 'B'), ('B', 'C', 'B', 'B', 'C'), ('B', 'C', 'B', 'C', 'A'), ('B', 'C', 'B', 'C', 'B'), ('B', 'C', 'B', 'C', 'C'), ('B', 'C', 'C', 'A', 'A'), ('B', 'C', 'C', 'A', 'B'), ('B', 'C', 'C', 'A', 'C'), ('B', 'C', 'C', 'B', 'A'), ('B', 'C', 'C', 'B', 'B'), ('B', 'C', 'C', 'B', 'C'), ('B', 'C', 'C', 'C', 'A'), ('B', 'C', 'C', 'C', 'B'), ('B', 'C', 'C', 'C', 'C'), ('C', 'A', 'A', 'A', 'A'), ('C', 'A', 'A', 'A', 'B'), ('C', 'A', 'A', 'A', 'C'), ('C', 'A', 'A', 'B', 'A'), ('C', 'A', 'A', 'B', 'B'), ('C', 'A', 'A', 'B', 'C'), ('C', 'A', 'A', 'C', 'A'), ('C', 'A', 'A', 'C', 'B'), ('C', 'A', 'A', 'C', 'C'), ('C', 'A', 'B', 'A', 'A'), ('C', 'A', 'B', 'A', 'B'), ('C', 'A', 'B', 'A', 'C'), ('C', 'A', 'B', 'B', 'A'), ('C', 'A', 'B', 'B', 'B'), ('C', 'A', 'B', 'B', 'C'), ('C', 'A', 'B', 'C', 'A'), ('C', 'A', 'B', 'C', 'B'), ('C', 'A', 'B', 'C', 'C'), ('C', 'A', 'C', 'A', 'A'), ('C', 'A', 'C', 'A', 'B'), ('C', 'A', 'C', 'A', 'C'), ('C', 'A', 'C', 'B', 'A'), ('C', 'A', 'C', 'B', 'B'), ('C', 'A', 'C', 'B', 'C'), ('C', 'A', 'C', 'C', 'A'), ('C', 'A', 'C', 'C', 'B'), ('C', 'A', 'C', 'C', 'C'), ('C', 'B', 'A', 'A', 'A'), ('C', 'B', 'A', 'A', 'B'), ('C', 'B', 'A', 'A', 'C'), ('C', 'B', 'A', 'B', 'A'), ('C', 'B', 'A', 'B', 'B'), ('C', 'B', 'A', 'B', 'C'), ('C', 'B', 'A', 'C', 'A'), ('C', 'B', 'A', 'C', 'B'), ('C', 'B', 'A', 'C', 'C'), ('C', 'B', 'B', 'A', 'A'), ('C', 'B', 'B', 'A', 'B'), ('C', 'B', 'B', 'A', 'C'), ('C', 'B', 'B', 'B', 'A'), ('C', 'B', 'B', 'B', 'B'), ('C', 'B', 'B', 'B', 'C'), ('C', 'B', 'B', 'C', 'A'), ('C', 'B', 'B', 'C', 'B'), ('C', 'B', 'B', 'C', 'C'), ('C', 'B', 'C', 'A', 'A'), ('C', 'B', 'C', 'A', 'B'), ('C', 'B', 'C', 'A', 'C'), ('C', 'B', 'C', 'B', 'A'), ('C', 'B', 'C', 'B', 'B'), ('C', 'B', 'C', 'B', 'C'), ('C', 'B', 'C', 'C', 'A'), ('C', 'B', 'C', 'C', 'B'), ('C', 'B', 'C', 'C', 'C'), ('C', 'C', 'A', 'A', 'A'), ('C', 'C', 'A', 'A', 'B'), ('C', 'C', 'A', 'A', 'C'), ('C', 'C', 'A', 'B', 'A'), ('C', 'C', 'A', 'B', 'B'), ('C', 'C', 'A', 'B', 'C'), ('C', 'C', 'A', 'C', 'A'), ('C', 'C', 'A', 'C', 'B'), ('C', 'C', 'A', 'C', 'C'), ('C', 'C', 'B', 'A', 'A'), ('C', 'C', 'B', 'A', 'B'), ('C', 'C', 'B', 'A', 'C'), ('C', 'C', 'B', 'B', 'A'), ('C', 'C', 'B', 'B', 'B'), ('C', 'C', 'B', 'B', 'C'), ('C', 'C', 'B', 'C', 'A'), ('C', 'C', 'B', 'C', 'B'), ('C', 'C', 'B', 'C', 'C'), ('C', 'C', 'C', 'A', 'A'), ('C', 'C', 'C', 'A', 'B'), ('C', 'C', 'C', 'A', 'C'), ('C', 'C', 'C', 'B', 'A'), ('C', 'C', 'C', 'B', 'B'), ('C', 'C', 'C', 'B', 'C'), ('C', 'C', 'C', 'C', 'A'), ('C', 'C', 'C', 'C', 'B'), ('C', 'C', 'C', 'C', 'C')]

Categories