# Black box algorithm to find standard generators of McL.2

	set F 0             # Have we found element 1?
	set G 0             # Have we found element 2?
	set V 0             # Timeout counter for "semi-standard" part
	set Y 0	            # Timeout counter for conjugating part

lbl SEMISTD
	rand 1
	ord 1 A
	incr V
	if V gt 1000 then timeout
	if A notin  1 2 3 4 5 6 7 8 9 10 11 12 14 15 20 22 24 30 then fail

	if F eq 0 then
		if A eq 22 then
			pwr 11 1 2
			set F 1
		endif
	endif
	if G eq 0 then
		if A eq 6 then
			pwr 2 1 3
			set G 1
			# This is likely to be an element in class 3B
			# (probability 30/31).
		endif
	endif

	if F eq 0 then jmp SEMISTD
	if G eq 0 then jmp SEMISTD
	
	set X 0
	set Z 0
lbl CONJUGATE
	incr Y
	if Y gt 1000 then timeout
	rand 4
	cjr 3 4
	mu 2 3 5
	ord 5 D

	if D notin 2 4 6 8 10 12 20 22 24 then
		# This is not McL.2!
		fail
	endif

	if D in 4 22 24 then
		# The second element is definitely in class 3B.
		set Z 1
	endif

	if Z eq 0 then
		incr X	
		if X gt 10 then
			# We have haven't been able to prove that the
			# second element is in class 3B.
			# We guess that it probably isn't, and start
			# looking again.
			set G 0
			jmp SEMISTD
		endif
	endif

	if D noteq 22 then jmp CONJUGATE

	mu 5 3 6  # abb
	mu 5 6 7  # ababb
	mu 5 5 8  # abab

	mu 8 7 9
	mu 9 7 10
	mu 10 6 11

	ord 11 E

	if E noteq 24 then jmp CONJUGATE

lbl FINISH
	oup 2 2 3

