#! /usr/bin/python

import json
import random

print 'Content-type: application/json'
print

deptChoice = [ 'CSCI', 'CSCI', 'NM  ' ]
numentries = random.randint(0, 31)
out = [ ]
for x in range(1, random.randint(0, 32)):
    dept = deptChoice[random.randint(0,2)]
    number = 101 + 15*random.randint(0,36)
    if (random.randint(0,5) < 5):
        section = "00" + str(random.randint(0,5))
    else:
        section = "0L" + str(random.randint(0,9))
    info  = {'dept' : dept, 'number' : number, 'section' : section}
    out.append(info)

print json.dumps(out)
