while True:
    try:
        a=input()
        money=300
        father=5*3
        mother=3*3
        kid=1
        result_list=[]
        for i in range(int(money/father)):
            for j in range(money-i*father):
                k=money-i*father-j*mother
                if i*father+j*mother+k*kid==money and i+j+k==100:
                    result_list.append([i,j,k])
        
        for x in result_list:
            for y in x:
                print(y,end=' ')
            print()
        

    except:
        break