1 #!/usr/bin/env python
2 import re
3 import sys
4
5 cn = sys.argv[1]
6
7 r1 = '((a?){%s})' % cn
8 r2 = 'a{%s}' % cn
9
10 m = re.match(r1 + r2 , "a" * int(cn))
11
12 print m.group(0)