import re
import json

myre = re.compile('([^\t]*)\t([^\t]*)\t(.+)')

f=open("stems.dat","r")

mylist = []
for l in f:
  m = myre.match(l)
  category = m.group(1)
  clue = m.group(2).strip() #.replace(" ","") #to remove the space in between
  answers1 = m.group(3)
  answers2 = answers1.strip() 
  answers = answers2.split("/")
  # print answers1, answers2, answers
  print json.dumps([category, clue, answers])+","
  #mylist.append([category, clue, answers])
# print json.dumps(mylist)