import sys
import json
import Api
import io

def main():
    # 创建一个使用UTF-8编码的包装器
    sys.stdin = io.TextIOWrapper(sys.stdin.detach(), encoding='utf-8')
    # 从标准输入读取JSON字符串
    input_json = sys.stdin.read().strip()
    # 解析JSON数据
    inputData = json.loads(input_json)
    
    # 从输入数据中获取调用接口
    api = inputData["api"]
    if (api == "addPerson"):
        result = Api.addPerson(inputData)
    elif (api == "createContract"):
        result = Api.createContract(inputData)
    elif (api == "addSigner"):
        result = Api.addSigner(inputData)
    elif (api == "downloadContract"):
        result = Api.downloadContract(inputData)
    elif (api == "contractStatus"):
        result = Api.contractStatus(inputData)
    elif (api == "willFace"):
        result = Api.willFace(inputData)
    else:
        result = ""

    # 输出结果
    print(result)


if __name__ == "__main__":
    main()