def get_tree():
    nlp = StanfordNLP()
    sentence = eval(input(""))
    handler = ppp_questionparsing_grammatical.QuotationHandler()
    simplifiedSentence = handler.pull(sentence)
    result = nlp.parse(simplifiedSentence)
    tree = ppp_questionparsing_grammatical.computeTree(result)
    handler.push(tree)
    ppp_questionparsing_grammatical.NamedEntityMerging(tree).merge()
    ppp_questionparsing_grammatical.PrepositionMerging(tree).merge()
    return tree
def get_answer(sentence=""):
    nlp = StanfordNLP()
    if sentence == "":
        sentence = eval(input(""))
    handler = ppp_questionparsing_grammatical.QuotationHandler()
    simplifiedSentence = handler.pull(sentence)
    result = nlp.parse(simplifiedSentence)
    tree = ppp_questionparsing_grammatical.computeTree(result)
    handler.push(tree)
    ppp_questionparsing_grammatical.NamedEntityMerging(tree).merge()
    ppp_questionparsing_grammatical.PrepositionMerging(tree).merge()
    qw = ppp_questionparsing_grammatical.simplify(tree)
    t = ppp_questionparsing_grammatical.normalFormProduction(tree, qw)
    return t