####################################################
#
# Try 50 iterations --
# Generate a random alphabetic string of length 250
# Look for a trigram that appears more than once
#
####################################################
#
for k in range(50):
s = []
for i in range(250):
s.append(chr(randrange(65,91)))
trigrams = []
for i in range(248):
trigram = s[i:i+3]
if trigram in trigrams:
print "Duplicate trigram %s at %3d, k = %3d" % (s[i:i+3], i, k)
else:
trigrams.append(trigram)