a = int(input())
b = int(input())
c = int(input())
n = int(input())
t = a+b+c+b
fc = n // t
rem = n % t
red = fc * (a + b)
yellow = fc * (b + b)
green = fc * c
if rem > 0:
t1 = min(rem, a)
red += t1
rem -= t1
if rem > 0:
t2 = min(rem, b)
red += t2
yellow += t2
rem -= t2
if rem > 0:
t3 = min(rem, c)
green += t3
rem-=t3
if rem > 0:
yellow += rem
print(red)
print(yellow)
print(green)