key = 0
def PrintMatrix(m):
    global key
    key = 0
    for i in m:
        print(' '.join([str(n) for n in i]))
while True:
    In = input()
    exec(In)
    if key:
        break