#!/usr/bin/python

x=input()
y=input()
z=input()
n=input()
xl=[i for i in range(0,x+1)]
yl=[i for i in range(0,y+1)]
zl=[i for i in range(0,z+1)]
print [(i,j,k) for i in xl for j in yl for k in zl if i+j+k!=n]
