>>11
Not that it matters too much for something like this, but it's considered bad practice to have a loop that concatenates to a string in Python. It reallocates a new string each iteration and it's slow. This is the way that won't get you bitched at when working with a team of Pythonistas.
import random, sys
tags = 'b u i o sup sub spoiler m aa s'.split()
ransom = []
for c in sys.stdin.read():
amount = random.randint(0, 5)
for tag in random.sample(tags, amount):
c = '[{0}]{1}[/{0}]'.format(tag, c)
ransom.append(c)
print ''.join(ransom)