A family consisting of father bear, mother bear and son bear owns three cars. Father bear can climb into the largest car and he likes it. Also, mother bear can climb into the middle car and she likes it. Moreover, son bear can climb into the smallest car and he likes it. It's known that the largest car is strictly larger than the middle car, and the middle car is strictly larger than the smallest car. 

Masha came to test these cars. She could climb into all cars, but she liked only the smallest car. 

It's known that a character with size a can climb into some car with size b if and only if a ≤ b, he or she likes it if and only if he can climb into this car and 2a ≥ b.

You are given sizes of bears and Masha. Find out some possible integer non-negative sizes of cars.

Input

You are given four integers V1, V2, V3, Vm(1 ≤ Vi ≤ 100) — sizes of father bear, mother bear, son bear and Masha, respectively. It's guaranteed that V1 > V2 > V3.

Output

Output three integers — sizes of father bear's car, mother bear's car and son bear's car, respectively.

If there are multiple possible solutions, print any.

If there is no solution, print "-1" (without quotes).

Examples

Input

50 30 10 10


Output

50
30
10


Input

100 50 10 21


Output

-1

Note

In first test case all conditions for cars' sizes are satisfied.

In second test case there is no answer, because Masha should be able to climb into smallest car (so size of smallest car in not less than 21), but son bear should like it, so maximum possible size of it is 20.

Source: codeforces | Difficulty: EASY
Tags: Implementation

Complete search


Solutions:
sizes = [int(x) for x in str(input()).split(' ')]
l = (sizes[0], 2 * sizes[0])
m = (max(2 * sizes[3] + 1, sizes[1]), 2 * sizes[1])
s = (max(sizes[2], sizes[3]), min(2 * sizes[2], 2 * sizes[3]))
if m[1] >= m[0] and s[1] >= s[0]:
	print(l[1])
	print(max(m[0], s[0]) + 1)
	print(s[0])
else:
	print(-1)


a = input().split()
for i in range(4):
	a[i] = int(a[i])
if a[3] >= a[1] or a[2] * 2 < a[3] or a[3] * 2 < a[2]:
	print(-1)
else:
	print(a[0] * 2)
	print(a[1] * 2)
	if a[3] >= a[2]:
		print(a[3])
	else:
		print(a[2])


(p, m, s, h) = map(int, input().split())
if s > 2 * h or h > 2 * s or h >= m:
	print(-1)
else:
	print(2 * p, 2 * m, max(s, h))


def STR():
	return list(input())

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def MAP2():
	return map(float, input().split())

def LIST():
	return list(map(int, input().split()))

def STRING():
	return input()
import string
import sys
from heapq import heappop, heappush
from bisect import *
from collections import deque, Counter, defaultdict
from math import *
from itertools import permutations, accumulate
dx = [-1, 1, 0, 0]
dy = [0, 0, 1, -1]

def check(i, v2):
	if 2 * v2 >= i and v2 <= i:
		return False
	return True
(v1, v2, v3, v4) = MAP()
(r1, r2, r3) = (0, 0, 0)
for i in range(v1, 300):
	if v1 <= i and 2 * v1 >= i and check(i, v2) and check(i, v3) and check(i, v4):
		r1 = i
		break
for i in range(v2, 300):
	if v2 <= i and 2 * v2 >= i and check(i, r1) and check(i, v3) and check(i, v4):
		r2 = i
		break
mx = max(v3, v4)
for i in range(mx, 300):
	if v3 <= i and 2 * v3 >= i and (v4 <= i) and (2 * v4 >= i) and check(i, r1) and check(i, r2):
		r3 = i
		break
if r1 == 0 or r2 == 0 or r3 == 0:
	print('-1')
else:
	print(r1, r2, r3)


(v1, v2, v3, vm) = map(int, input().split())
c1 = 2 * v1
c2 = 2 * v2
hi_baby = 2 * v3
lo_baby = v3
hi_masha = 2 * vm
lo_masha = vm
if lo_baby > hi_masha:
	print(-1)
elif lo_masha > hi_baby:
	print(-1)
elif hi_masha >= c2 >= lo_masha:
	print(-1)
elif hi_masha >= c1 >= lo_masha:
	print(-1)
else:
	print(c1, c2, sorted([lo_baby, lo_masha, hi_baby, hi_masha])[1], sep='\n')


(v1, v2, v3, vm) = map(int, input().split())
if vm >= v2 or 2 * v3 < vm or 2 * vm < v3:
	print('-1')
else:
	print(2 * v1)
	print(2 * v2)
	print(max(v3, vm))


(a, b, c, m) = [int(x) for x in input().split()]
possible = True
if m > 2 * c or m > b:
	possible = False
sm = max(m, c)
if sm > 2 * m or sm > 2 * c:
	possible = False
me = max(b, 2 * m + 1)
if me > 2 * b:
	possible = False
la = max(a, 2 * m + 2)
if la > 2 * a:
	possible = False
if possible:
	print(la)
	print(me)
	print(sm)
else:
	print(-1)


(v1, v2, v3, vm) = (int(w) for w in input().split())
if vm >= v2 or vm > 2 * v3 or vm < 0.5 * v3:
	print(-1)
elif vm < v3:
	Ans = [2 * v1, 2 * v2, v3]
	for w in Ans:
		print(w)
else:
	Ans = [2 * v1, 2 * v2, 2 * v3]
	for w in Ans:
		print(w)


import bisect

def list_output(s):
	print(' '.join(map(str, s)))

def list_input(s='int'):
	if s == 'int':
		return list(map(int, input().split()))
	elif s == 'float':
		return list(map(float, input().split()))
	return list(map(str, input().split()))
(v1, v2, v3, vm) = map(int, input().split())
s1_lo = max(v1, 2 * vm + 1)
s1_hi = 2 * v1
s2_lo = max(v2, 2 * vm + 1)
s2_hi = 2 * v2
s3_lo = max(v3, vm)
s3_hi = min(2 * v3, 2 * vm)
if s1_lo > s1_hi or s2_lo > s2_hi or s3_lo > s3_hi:
	print('-1')
else:
	s1 = s1_hi
	s2 = min(s1_hi - 1, s2_hi)
	s3 = min(s2 - 1, s3_lo)
	if s1 <= s2 or s2 <= s3:
		print('-1')
	else:
		print(s1)
		print(s2)
		print(s3)


def main():
	l = [int(x) for x in input().split()]
	car = 0
	flag = False
	if l[3] >= l[2]:
		if 2 * l[2] >= l[3]:
			flag = True
			car = l[3]
	elif 2 * l[3] >= l[2]:
		flag = True
		car = l[2]
	if l[0] <= l[3] or l[1] <= l[3]:
		flag = False
	if l[1] <= 2 * l[3]:
		l[1] = 2 * l[3] + 1
		if l[0] <= l[1]:
			l[0] = l[1] + 1
	if flag:
		print(l[0])
		print(l[1])
		print(car)
	else:
		print(-1)
main()


(a, b, c, d) = map(int, input().split())
m = max(c, d)
if 2 * c >= m and 2 * d >= m and (m < b):
	print(2 * a, 2 * b, m)
else:
	print(-1)


(a, b, c, d) = map(int, input().split())
if d > c * 2 or d * 2 < c or d >= b:
	print('-1')
else:
	print(a * 2)
	print(b * 2)
	print(max(c, d))


arr = [int(n) for n in input().split()]
i = 0
if arr[2] * 2 >= arr[3]:
	if arr[3] * 2 >= arr[2]:
		if arr[3] < arr[1]:
			i = 1
flag = True
if i:
	for n in range(2):
		if arr[3] * 2 >= arr[n]:
			arr[n] = arr[3] * 2 + 1
	if arr[0] <= arr[1]:
		r = arr[1] - arr[0]
		arr[0] = arr[0] + r + 1
	if flag:
		for s in arr[:2]:
			print(s)
		print(max(arr[2:]))
else:
	print(-1)


(pai, mae, filho, maria) = [int(x) for x in input().split(' ')]

def solve():
	if filho > 2 * maria or maria > 2 * filho or maria >= mae:
		return -1
	if filho > maria:
		return (max(pai, 2 * maria + 2), max(mae, 2 * maria + 1), filho)
	return (max(pai, 2 * maria + 2), max(mae, 2 * maria + 1), maria)
x = solve()
if x == -1:
	print(-1)
else:
	print(x[0])
	print(x[1])
	print(x[2])


v = list(map(int, input().strip().split()))
m = max(v[2], v[3])
if 2 * m >= 2 * v[1] or 2 * v[3] < m or 2 * v[2] < m:
	print('-1')
else:
	print(2 * v[0])
	print(2 * v[1])
	print(m)


(dad, mom, son, masha) = map(int, input().split())
ans = []
for size in range(1, 2 * son + 1):
	if son <= size <= 2 * son:
		if masha <= size <= 2 * masha:
			ans.append(size)
			break
try:
	for size in range(ans[0] + 1, 2 * 101):
		if mom <= size <= 2 * mom and size > 2 * masha:
			ans.append(size)
			break
	for size in range(ans[1] + 1, 2 * 101):
		if dad <= size <= 2 * dad and size > 2 * masha:
			ans.append(size)
			break
	print(*(reversed(ans) if len(ans) == 3 else -1), sep='\n')
except IndexError:
	print(-1)


(dad, mom, son, Masha) = [int(i) for i in input().split()]
if Masha > 2 * son or son > 2 * Masha:
	print(-1)
elif Masha >= dad or Masha >= mom:
	print(-1)
else:
	print(2 * dad, 2 * mom, min(2 * Masha, 2 * son))


def aaa():
	(a, b, c, d) = map(int, input().split())
	for aa in range(a, 2 * a + 1):
		for bb in range(b, min(aa, 2 * b + 1)):
			for cc in range(c, min(bb, 2 * c + 1)):
				if d <= aa and aa > d * 2 and (d <= bb) and (bb > d * 2) and (d <= cc) and (cc <= d * 2):
					return [aa, bb, cc]
	return [-1]
for aa in aaa():
	print(aa)


(v1, v2, v3, vm) = list(map(int, input().split()))
ans = []

def can_climb(a, b):
	return a <= b

def likes(a, b):
	return 2 * a >= b
for b1 in range(1, 221):
	if can_climb(v1, b1) and can_climb(vm, b1):
		if likes(v1, b1) and likes(vm, b1) == False:
			for b2 in range(1, 221):
				if can_climb(v2, b2) and can_climb(vm, b2):
					if likes(v2, b2) and likes(vm, b2) == False:
						for b3 in range(1, 221):
							if can_climb(v3, b3) and can_climb(vm, b3):
								if likes(v3, b3) and likes(vm, b3):
									if b1 != b2 and b2 != b3 and (b1 != b3):
										ans = sorted([b1, b2, b3])
										print(ans[2])
										print(ans[1])
										print(ans[0])
										exit(0)
print(-1)


(v1, v2, v3, vm) = map(int, input().split())
(f1, f2) = (max(v1, 2 * vm + 1), 2 * v1)
(m1, m2) = (max(v2, 2 * vm + 1), 2 * v2)
(s1, s2) = (max(v3, vm), min(2 * v3, 2 * vm))
if f1 > f2 or m1 > m2 or s1 > s2:
	print(-1)
else:
	print(f2, m2, s2, sep='\n')


(a, b, c, d) = map(int, input().split())
R = 0
if c < d:
	R = d - c
if R > c or c > d * 2:
	exit(print(-1))
c += R
b *= 2
a *= 2
if b <= d * 2:
	exit(print(-1))
print(a)
print(b)
print(c)


(a, b, c, d) = list(map(int, input().split()))
for i in range(0, 300):
	for j in range(0, i):
		for k in range(d, j):
			if a <= i <= a + a and b <= j <= b + b and (c <= k <= c + c) and (k <= d + d) and (j > d + d):
				print(str(i) + '\n' + str(j) + '\n' + str(k))
				exit(0)
print(-1)


(v1, v2, v3, vm) = map(int, input().split())
(a, b, c) = (2 * v1, 2 * v2, min(2 * vm, 2 * v3))
if not min(v3, vm) * 2 >= c >= max(v3, vm) or v1 <= vm or v2 <= vm:
	print(-1)
else:
	print(a)
	print(b)
	print(c)


def main():
	(s1, s2, s3, s4) = list(map(int, input().split(' ')))
	c1s = range(s1, 2 * s1 + 1)
	for c1 in c1s:
		c2s = range(max(s2, 2 * s4 + 1), min(c1, 2 * s2 + 1))
		for c2 in c2s:
			c3s = range(max(s3, s4), min(c2, 2 * s3 + 1, 2 * s4 + 1))
			for c3 in c3s:
				return (c1, c2, c3)
	return None
ans = main()
if ans:
	print(ans[0])
	print(ans[1])
	print(ans[2])
else:
	print('-1')


(a, b, c, m) = map(int, input().split())
if 2 * m + 2 > 2 * a or 2 * m + 1 > 2 * b or m > 2 * c or (2 * m < c):
	print(-1)
	exit()
if 2 * m + 2 <= a:
	print(a)
else:
	print(2 * m + 2)
if 2 * m + 1 <= b:
	print(b)
else:
	print(2 * m + 1)
if m >= c:
	print(m)
else:
	print(c)


from collections import *
import os, sys
from io import BytesIO, IOBase

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
BUFSIZE = 8192
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
rstr = lambda : input().strip()
rstrs = lambda : [str(x) for x in input().split()]
rstr_2d = lambda n: [rstr() for _ in range(n)]
rint = lambda : int(input())
rints = lambda : [int(x) for x in input().split()]
rint_2d = lambda n: [rint() for _ in range(n)]
rints_2d = lambda n: [rints() for _ in range(n)]
ceil1 = lambda a, b: (a + b - 1) // b
(dad, mam, son, masha) = rints()
for i in range(dad, dad * 2 + 1):
	for j in range(mam, mam * 2 + 1):
		for k in range(son, son * 2 + 1):
			if i > j > k and masha <= k and (masha * 2 >= k) and (masha * 2 < min(i, j)):
				exit(print(i, j, k, sep='\n'))
print(-1)


(f, m, s, p) = map(int, input().split())
c1 = f * 2
c2 = m * 2
if p >= m:
	print(-1)
	exit()
if max(p, s) / 2 <= min(p, s) <= max(p, s):
	c3 = min(p, s) * 2
else:
	print(-1)
	exit()
print(c1)
print(c2)
print(c3)


(a, b, c, d) = map(int, input().split())
for i in range(d, 2 * d + 1):
	if i <= c * 2 <= i * 2:
		if b > d:
			print(a * 2)
			print(b * 2)
			print(i)
			exit()
print(-1)


(v1, v2, v3, vm) = map(int, input().split())
for x in range(v1, 2 * v1 + 1):
	for y in range(v2, 2 * v2 + 1):
		for z in range(v3, 2 * v3 + 1):
			if z <= 2 * vm <= 2 * z and x > y > z and (2 * vm < x and 2 * vm < y):
				print(x, y, z, sep='\n')
				quit()
print(-1)


import sys
input = sys.stdin.readline
(a, b, c, d) = map(int, input().split())
if 2 * a < d or 2 * b < d or 2 * d >= 2 * a or (2 * d >= 2 * b):
	print('-1')
	exit(0)
if d < c:
	(c, d) = (d, c)
if 2 * c < d or 2 * d < 2 * c:
	print('-1')
	exit(0)
print(2 * a)
print(2 * b)
print(2 * c)


vol = [int(i) for i in input().split(' ')]
small = max(vol[2], vol[3])
middle = 2 * vol[1]
large = 2 * vol[0]
res = 0
if 2 * vol[2] < vol[3]:
	res = -1
if vol[2] > vol[3]:
	if vol[3] * 2 < vol[2]:
		res = -1
elif vol[2] * 2 < vol[3]:
	res = -1
if vol[3] * 2 >= middle:
	res = -1
if small >= middle or middle >= large:
	res = -1
if res < 0:
	print(res)
else:
	print(large, middle, small, sep='\n')


(father, mother, son, masha) = map(int, input().split())
ans1 = 0
ans2 = 0
ans3 = 0
if masha <= 2 * father:
	if 2 * masha < father:
		ans1 = 2 * father
	elif 2 * masha < 2 * father:
		ans1 = 2 * father
	else:
		print(-1)
		quit()
else:
	print(-1)
	quit()
if masha <= 2 * mother:
	if 2 * masha < mother:
		ans2 = mother
	elif 2 * masha < 2 * mother:
		ans2 = 2 * masha + 1
	else:
		print(-1)
		quit()
else:
	print(-1)
	quit()
if masha <= 2 * son:
	if 2 * masha >= son:
		ans3 = max(masha, son)
	else:
		print(-1)
		quit()
else:
	print(-1)
	quit()
if ans1 == -1 or ans2 == -1 or ans3 == -1:
	print(-1)
elif ans1 > ans2 and ans2 > ans3:
	print(ans1)
	print(ans2)
	print(ans3)
else:
	print(-1)


(L, M, S, Ma) = map(int, input().split())
l = max(S, Ma)
s = min(S, Ma)
if s * 2 < l:
	print(-1)
elif l >= L or l >= M:
	print(-1)
else:
	print(L * 2)
	print(M * 2)
	print(s * 2)


import sys
i = input()
(v1, v2, v3, v4) = list(map(int, i.split(' ')))
(c1, c2, c3) = (0, 0, 0)
if v3 > v4:
	if v3 > v4 * 2:
		print(-1)
		sys.exit()
	c3 = v3
else:
	if v4 > v3 * 2:
		print(-1)
		sys.exit()
	c3 = v4
for c in range(c3 + 1, 200):
	if c >= v2 and c <= v2 * 2 and (c > v4 * 2):
		c2 = c
		break
if c2 == 0:
	print(-1)
	sys.exit()
for c in range(c2 + 1, 201):
	if c >= v1 and c <= v1 * 2 and (c > v4 * 2):
		c1 = c
		break
if c1 == 0:
	print(-1)
	sys.exit()
print(c1)
print(c2)
print(c3)


(p, m, s, h) = map(int, input().split())
t = max(s, h)
if t > 2 * min(s, h) or h >= m:
	print(-1)
else:
	a = 2 * h + 1
	(ap, am) = (max(p, a) + 1, max(m, a))
	print(ap, am, t)


u = list(map(int, input().strip().split()))
m = u[3]
if m * 2 >= u[2] and m <= u[2] * 2 and (m < u[1]):
	print(u[0] * 2)
	print(u[1] * 2)
	print(max(m, u[2]))
else:
	print(-1)


(v1, v2, v3, vm) = map(int, input().split())
if v3 * 2 >= vm and v2 > vm and (vm * 2 >= v3):
	print(v1 * 2)
	print(v2 * 2)
	print(min(vm * 2, v3 * 2))
else:
	print('-1')


(V1, V2, V3, Vm) = map(int, input().split())
v = [[0, 200] for i in range(3)]
(v[0][0], v[1][0], v[2][0]) = (max(V1, 2 * Vm + 1), max(V2, 2 * Vm + 1), max(V3, Vm))
(v[0][1], v[1][1], v[2][1]) = (2 * V1, 2 * V2, min(2 * V3, 2 * Vm))
if not ((V1 <= v[0][1] and v[0][1] <= 2 * V1) and (V2 <= v[1][1] and v[1][1] <= 2 * V2) and (V3 <= v[2][1] and v[2][1] <= 2 * V3) and (v[0][0] <= v[0][1] and v[1][0] <= v[1][1] and (v[2][0] <= v[2][1]))):
	print(-1)
else:
	ans = [v[0][1]]
	last = v[0][1]
	if v[1][0] <= last:
		ans.append(min(v[1][1], last))
		last = min(v[1][1], last)
	else:
		print(-1)
		exit()
	if v[2][0] <= last:
		ans.append(min(v[2][1], last))
	else:
		print(-1)
		exit()
	print('\n'.join(map(str, ans)))


import sys
(v1, v2, v3, vm) = map(int, input().split())
if vm <= v3 * 2 and v3 <= vm * 2 and (vm < v2):
	vm3 = max(vm, v3)
	vm2 = max(2 * vm + 1, v2)
	vm1 = max(vm2 + 1, v1)
	print(vm1, vm2, vm3, sep='\n')
else:
	print(-1)


(z, zz, dgraphs, mod) = (input, lambda : list(map(int, z().split())), {}, 10 ** 9 + 7)
from string import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
(a, b, c, d) = zz()
m = max(c, d)
if 2 * c >= m and 2 * d >= m and (m < b):
	print(2 * a, 2 * b, m)
else:
	print(-1)


(a, b, c, d) = [int(i) for i in input().split()]
flag = False
for x in range(max(a, 2 * d + 1), 2 * a + 1):
	for y in range(max(b, 2 * d + 1), 2 * b + 1):
		for z in range(c, 2 * c + 1):
			if x > y > z and d <= z and (2 * d >= z):
				print(x, y, z)
				flag = True
				break
		if flag:
			break
	if flag:
		break
else:
	print(-1)


[v1, v2, v3, v4] = [int(i) for i in input().split()]
b = []
e = 0
if v4 > 2 * v3 or v3 > 2 * v4:
	e = 10
else:
	b.append(max(v3, v4))
	c = max(2 * v4 + 1, v2, b[0] + 1)
	if c > 2 * v2:
		e = 10
	else:
		b.append(c)
		d = max(c + 1, v1)
		if d > 2 * v1:
			e = 10
		else:
			b.append(d)
if e != 10:
	for i in range(1, len(b) + 1):
		print(b[-i])
else:
	print(-1)


(a, b, c, m) = map(int, input().split())

def climb(a, b):
	return a <= b

def like(a, b):
	return 2 * a >= b

def f():
	for cc in range(c, 2 * a + 1):
		for cb in range(max(b, cc + 1), 2 * a + 1):
			for ca in range(max(a, cb + 1), 2 * a + 1):
				if climb(m, ca) and climb(m, cb) and climb(m, cc) and (not like(m, ca)) and (not like(m, cb)) and like(m, cc) and climb(c, cc) and climb(b, cb) and climb(a, ca) and like(c, cc) and like(b, cb) and like(a, ca):
					print(ca, cb, cc)
					return
	print(-1)
f()


def likes(v, i):
	return v <= i and 2 * v >= i
(v1, v2, v3, vm) = [int(i) for i in input().split()]
for i in range(201):
	for j in range(i):
		for k in range(j):
			if likes(v1, i) and likes(v2, j) and likes(v3, k) and likes(vm, k) and (not likes(vm, j)) and (not likes(vm, i)):
				print('%s\n%s\n%s' % (i, j, k))
				exit()
print('-1')


v = list(map(int, input().split()))
count = 0
if max(v[2], v[3]) <= min(2 * v[2], 2 * v[3]):
	v[2] = min(max(v[2], v[3]), min(2 * v[2], 2 * v[3]))
else:
	print(-1)
	count += 1
if v[1] <= 2 * v[2] + 1 <= 2 * v[1]:
	v[1] = 2 * v[2] + 1
elif v[1] > 2 * v[2]:
	v[1] = v[1]
elif count == 0:
	print(-1)
	count += 1
if v[0] == v[1]:
	v[0] = v[1] + 1
elif v[0] < v[1] < 2 * v[0]:
	v[0] = v[1] + 1
elif v[1] < v[0]:
	v[0] = v[0]
elif count == 0:
	print(-1)
	count += 1
if count == 0:
	print(v[0])
	print(v[1])
	print(v[2])


x = input().split()
v1 = int(x[0])
v2 = int(x[1])
v3 = int(x[2])
v4 = int(x[3])
num = -1
if v4 <= 2 * v3 and v3 <= 2 * v4:
	num = 0
if num == -1:
	print(num)
else:
	c3 = max(v4, v3)
	c2 = max(v2, 2 * v4 + 1, c3 + 1)
	c1 = max(v1, c2 + 1)
	if c3 > 2 * v3 or c2 > 2 * v2 or c1 > 2 * v1:
		print(-1)
	else:
		print(f'{c1}\n{c2}\n{c3}')


(v1, v2, v3, v4) = map(int, input().split())

def find_car_size():
	if v3 > v4 and v3 > 2 * v4 or (v4 > v3 and v4 > v3 * 2):
		return None
	sons = min(v3, v4) * 2
	minimum_mom = v4 * 2 + 1
	if v2 <= v4:
		return None
	moms = max(minimum_mom, v2)
	fathers = max(moms + 1, v1)
	return [fathers, moms, sons]
res = find_car_size()
if not res:
	print(-1)
else:
	for i in range(3):
		print(res[i])


(a, b, c, d) = map(int, input().split())
for x in range(205):
	for y in range(x):
		for z in range(y):
			if x >= a and y >= b and (z >= c) and (z >= d):
				if x <= 2 * a and y <= 2 * b and (z <= 2 * c):
					if 2 * d >= z and 2 * d < y and (2 * d < x):
						print(x, y, z)
						exit(0)
print(-1)


import sys
f = sys.stdin
(v1, v2, v3, v4) = map(int, f.readline().split())

def get_answer(v1, v2, v3, v4):
	r = []
	if not max(v1, 2 * v4 + 1) <= 2 * v1:
		return None
	r.append(2 * v1)
	if not max(v2, 2 * v4 + 1) <= 2 * v2:
		return None
	r.append(2 * v2)
	if not max(v3, v4) <= min(v3 * 2, v4 * 2):
		return None
	r.append(max(v3, v4))
	if r[0] > r[1] > r[2]:
		return r
	return None
r = get_answer(v1, v2, v3, v4)
if r:
	for x in r:
		print(x)
else:
	print(-1)


import sys

def likes(charsize, carsize):
	return 2 * charsize >= carsize
(f, m, s, masha) = map(int, input().split())
fl = f
ml = m
sl = s
fh = f * 2
mh = m * 2
sh = s * 2
for tryf in range(fl, fh + 1):
	for trym in range(ml, mh + 1):
		for trys in range(sl, sh + 1):
			if tryf > trym > trys and masha <= trys and likes(masha, trys) and (not likes(masha, trym)) and (not likes(masha, tryf)):
				print(tryf)
				print(trym)
				print(trys)
				sys.exit()
print(-1)


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
(v1, v2, v3, v4) = f()
x = max(v3, v4)
if 2 * v3 >= x and 2 * v4 >= x and (x < v2):
	print(2 * v1, 2 * v2, x)
else:
	print(-1)


v = list(map(int, input().split()))
if v[3] <= 2 * v[2] and 2 * v[3] >= v[2] and (2 * v[3] < 2 * v[1]):
	print(2 * v[0])
	print(2 * v[1])
	print(max(v[2], v[3]))
else:
	print(-1)


(v1, v2, v3, vm) = map(int, input().split())
d = [[[-1 for k in range(207)] for j in range(207)] for i in range(207)]
ok = False
for i in range(v1, 201):
	if ok:
		break
	for j in range(v2, 201):
		if ok:
			break
		for k in range(v3, 201):
			if ok:
				break
			if 2 * v1 >= i and 2 * v2 >= j and (2 * v3 >= k) and (vm <= min(i, j, k)) and (k <= 2 * vm < min(i, j)) and (i > j > k):
				print(i)
				print(j)
				print(k)
				ok = True
if not ok:
	print(-1)


import sys
v = list(map(int, input().split()))
ret = [0, 0, 0]
ret[2] = max(v[2], v[3])
if ret[2] > v[2] * 2 or ret[2] > v[3] * 2:
	print(-1)
	sys.exit(0)
ret[1] = max(ret[2] + 1, v[1], 2 * v[3] + 1)
if ret[1] > v[1] * 2:
	print(-1)
	sys.exit(0)
ret[0] = max(ret[1] + 1, v[0])
if ret[0] > v[0] * 2:
	print(-1)
else:
	print('\n'.join(list(map(str, ret))))


x = list(map(int, input().split()))
if x[3] < x[1] and x[3] <= 2 * x[2] and (x[2] <= 2 * x[3]):
	print(2 * x[0])
	print(2 * x[1])
	print(min(2 * x[2], 2 * x[3]))
else:
	print(-1)


import math, random, sys, os, re
(v1, v2, v3, v4) = map(int, input().split())
if v4 > 2 * v3 or v4 >= v2 or v3 > 2 * v4:
	print(-1)
else:
	print(2 * v1)
	print(2 * v2)
	print(max(v3, v4))


(papa, mama, son, masha) = (int(x) for x in input().split())
if 2 * masha < son or masha > 2 * son or masha >= mama:
	print(-1)
	quit()
car3 = son
if masha > son:
	car3 = masha
car2 = 2 * mama
car1 = 2 * papa
print(car1, car2, car3, sep='\n')


(v1, v2, v3, vm) = map(int, input().split())
flag = 0
l = []
for i in range(2 * v1, v1 - 1, -1):
	if i > 2 * vm:
		l.append(i)
		break
else:
	flag = 1
if not flag:
	for i in range(2 * v2, v2 - 1, -1):
		if i > 2 * vm and i < l[0]:
			l.append(i)
			break
	else:
		flag = 1
if not flag:
	for i in range(v3, 2 * v3 + 1):
		if i >= vm and i <= 2 * vm and (i < l[1]):
			l.append(i)
			break
	else:
		flag = 1
if flag:
	print('-1')
else:
	print(l[0])
	print(l[1])
	print(l[2])


(a, b, c, m) = list(map(int, input().split()))
if m > c * 2 or m * 2 < c or m >= b:
	print(-1)
	exit()
elif m > c:
	c = c * 2
print(a * 2)
print(b * 2)
print(c)


x = [i for i in input().split(' ')]
s = []
for i in x:
	s.append(int(i))
v1 = s[0]
v2 = s[1]
v3 = s[2]
vm = s[3]
c1 = []
c2 = []
c3 = []
for j in range(1, 201):
	if j <= 2 * v3 and j >= v3 and (j <= 2 * vm) and (j >= vm):
		c3.append(int(j))
	if j <= 2 * v2 and j >= v2 and (j > 2 * vm) and (j >= vm):
		c2.append(int(j))
	if j <= 2 * v1 and j >= v1 and (j >= vm) and (j > 2 * vm):
		c1.append(int(j))
first = 0
second = 0
if len(c1) == 0 or len(c2) == 0 or len(c3) == 0:
	print(-1)
else:
	for x in c2:
		if x > c3[0]:
			second = x
			break
	for y in c1:
		if y > c2[0]:
			first = y
			break
	print(first)
	print(second)
	print(c3[0])


l = list(map(int, input().split()))
if l[2] * 2 < l[3] or l[2] > l[3] * 2 or l[3] >= l[1]:
	print(-1)
else:
	print(l[0] * 2)
	print(l[1] * 2)
	print(max(l[2], l[3]))


(v1, v2, v3, vm) = map(int, input().split())
f = False
for a in range(1, 201):
	for b in range(a + 1, 201):
		for c in range(b + 1, 201):
			if a >= max(vm, v3) and b >= max(vm, v2) and (c >= max(vm, v1)):
				if a <= 2 * v3 and b <= 2 * v2 and (c <= 2 * v1):
					if b > 2 * vm and c > 2 * vm and (a <= 2 * vm):
						print(c)
						print(b)
						print(a)
						f = True
						break
		if f:
			break
	if f:
		break
if not f:
	print(-1)


import sys
sys.setrecursionlimit(1000000)
read = sys.stdin.readline
(c1, c2, c3, cm) = map(int, read().split())
ans = None
for _c1 in range(200 + 1):
	for _c2 in range(_c1):
		for _c3 in range(_c2):
			if (_c1 > _c2 and _c2 > _c3) and (_c1 >= c1 and _c1 <= 2 * c1) and (_c2 >= c2 and _c2 <= 2 * c2) and (_c3 >= c3 and _c3 <= 2 * c3) and (_c3 >= cm and _c3 <= 2 * cm) and (not (_c2 >= cm and _c2 <= cm * 2)) and (not (_c1 >= cm and _c1 <= cm * 2)):
				ans = (_c1, _c2, _c3)
				break
if ans is None:
	print(-1)
else:
	print(*ans, sep='\n')


def bears(n1, n2, n3, n4):
	if n4 < n2 and n4 <= 2 * n3 and (n3 <= 2 * n4):
		return (2 * n1, 2 * n2, min(2 * n3, 2 * n4))
	return [-1]
(v1, v2, v3, v4) = [int(i) for i in input().split()]
print(*bears(v1, v2, v3, v4), sep='\n')


(a, b, c, d) = [int(i) for i in input().split()]
if d > 2 * c or c > d * 2:
	print(-1)
else:
	if c > d:
		e = min(c, d * 2)
	else:
		e = min(d, c * 2)
	if d <= e + 1 and d >= b:
		print(-1)
	else:
		print(2 * a)
		print(2 * b)
		print(e)


n = [int(x) for x in input().split(' ')]
m = n[3]
poss = True
cars = []
if n[0] <= m:
	poss = False
else:
	cars.append(2 * n[0])
	if n[1] <= m:
		poss = False
	else:
		cars.append(2 * n[1])
		if n[2] > 2 * m or 2 * n[2] < m:
			poss = False
		else:
			cars.append(max(m, n[2]))
if poss:
	print('\n'.join([str(x) for x in cars]))
else:
	print(-1)


import sys
(v1, v2, v3, vm) = map(int, input().split(' '))
arr = []
s1 = max(v1, vm)
if 2 * v1 > 2 * vm and 2 * v1 >= s1:
	arr.append(2 * v1)
else:
	print('-1')
	sys.exit()
s2 = max(v2, vm)
if 2 * v2 > 2 * vm and 2 * v1 >= s2:
	arr.append(2 * v2)
else:
	print('-1')
	sys.exit()
s3 = max(v3, vm)
s4 = min(2 * v3, 2 * vm)
if s4 >= s3:
	arr.append(s4)
else:
	print('-1')
	sys.exit()
for i in range(3):
	print(arr[i])


(a, b, c, m) = [int(i) for i in input().split()]
ra = 2 * a
rb = 2 * b
rc = min(c, m) * 2
if m < ra / 2 and m < rb / 2 and (rc / 2 <= m <= rc) and (rc / 2 <= c <= rc):
	print(ra, rb, rc)
else:
	print(-1)


(a, b, c, d) = list(map(int, input().split()))
if d > 2 * c or 2 * d < c or d >= b:
	print('-1')
else:
	print(2 * a, 2 * b, min(2 * c, 2 * d))


(V1, V2, V3, Vm) = map(int, input().split())
if Vm >= V2 or 2 * min(V3, Vm) < max(V3, Vm):
	print(-1)
else:
	print(2 * V1, 2 * V2, 2 * min(V3, Vm), sep='\n')


(a, b, c, d) = map(int, input().split())
cmax = c * 2
cmin = c
if d <= cmax and d >= cmin / 2:
	c1 = min(2 * d, cmax)
	if d < b / 2:
		b1 = b
	else:
		b1 = 2 * d + 1
	b1 = max(b1, c1 + 1)
	a1 = max(a, b1 + 1)
	if a1 <= 2 * a and b1 <= 2 * b:
		print(a1)
		print(b1)
		print(c1)
	else:
		print(-1)
else:
	print(-1)


(a, b, c, d) = map(int, input().split())
p1 = [False] * 201
p2 = [False] * 201
p3 = [False] * 201
p4 = [False] * 201
for i in range(a, 2 * a + 1):
	p1[i] = True
for i in range(b, 2 * b + 1):
	p2[i] = True
for i in range(c, 2 * c + 1):
	p3[i] = True
for i in range(d, 2 * d + 1):
	p4[i] = True
o1 = o2 = o3 = None
for i in range(1, 201):
	if p3[i] == p4[i] == True:
		o3 = i
		break
for i in range(200, 0, -1):
	if p1[i] == True and p4[i] == False:
		o1 = i
		break
if None in [o3, o1]:
	print(-1)
else:
	for i in range(o3 + 1, o1):
		if p2[i] == True and p4[i] == False:
			o2 = i
			break
	if o2 == None:
		print(-1)
	else:
		print(o1)
		print(o2)
		print(o3)


a = list(map(int, input().split()))
if a[3] > 2 * a[2] or 2 * a[3] < a[2] or a[3] >= a[1]:
	print('-1')
else:
	print(2 * a[0], 2 * a[1], min(2 * a[2], 2 * a[3]))


def loop():
	(b1, b2, b3, m) = (int(x) for x in input().split())
	for b1i in range(b1, 2 * b1 + 1):
		for b2i in range(b2, 2 * b2 + 1):
			for b3i in range(b3, 2 * b3 + 1):
				if b1i > b2i > b3i and m <= b3i and (2 * m >= b3i) and (2 * m < b2i):
					print(b1i)
					print(b2i)
					print(b3i)
					return
	print(-1)
loop()


(a1, a2, a3, a4) = map(int, input().split())
if a4 > a3 * 2 or 2 * a4 < a3 or a4 >= a2:
	print(-1)
else:
	print(a1 * 2)
	print(a2 * 2)
	print(min(2 * a4, 2 * a3))


r = lambda : list(map(int, input().split()))
(v1, v2, v3, m) = r()
if m > 2 * v3 or v3 > 2 * m or m >= v2:
	print(-1)
else:
	print(2 * v1)
	print(2 * v2)
	print(max(v3, m))


import math, sys, bisect, heapq
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
int1 = lambda x: int(x) - 1
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))
ilelec = lambda : map(int1, input().split())
alelec = lambda : list(map(int1, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])
(a, b, c, d) = ilele()
for i in range(a, 2 * a + 1):
	for j in range(b, 2 * b + 1):
		for k in range(c, 2 * c + 1):
			if i >= a and 2 * a >= i and (j >= b) and (2 * b >= j) and (k >= c) and (2 * c >= k) and (i > j > k) and (d <= k) and (2 * d >= k) and (2 * d < i) and (2 * d < j):
				flag = 1
				print(i)
				print(j)
				print(k)
				exit(0)
print(-1)


(v1, v2, v3, vm) = map(int, input().split())
car = max(vm, v3)
if car >= v1 or car >= v2:
	print(-1)
	exit(0)
if vm * 2 >= car and v3 * 2 >= car:
	print(v1 * 2)
	print(v2 * 2)
	print(car)
else:
	print(-1)


class CodeforcesTask907ASolution:

	def __init__(self):
		self.result = ''
		self.sizes = []

	def read_input(self):
		self.sizes = [int(x) for x in input().split(' ')]

	def process_task(self):
		res = []
		res.append(2 * self.sizes[0])
		res.append(min(2 * self.sizes[1], 2 * self.sizes[0] - 1))
		res.append(min(max(self.sizes[2], self.sizes[3]), min(self.sizes[2], self.sizes[3]) * 2))
		if res[2] >= self.sizes[1] or res[2] >= self.sizes[0] or min(self.sizes[2], self.sizes[3]) * 2 < max(self.sizes[2], self.sizes[3]):
			res = [-1]
		self.result = '\n'.join([str(x) for x in res])

	def get_result(self):
		return self.result
Solution = CodeforcesTask907ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


(a, b, c, d) = map(int, input().split())
found = False
(x, y, z) = (-1, -1, -1)
for i in range(201):
	for j in range(i + 1, 201):
		for k in range(j + 1, 201):
			if 2 * d >= i and 2 * c >= i:
				if j > 2 * d and k > 2 * d:
					if j > 2 * c and k > 2 * c:
						if 2 * a >= k and 2 * b >= j:
							if a <= k and b <= j and (c <= i) and (d <= i):
								if not found:
									(z, y, x) = (i, j, k)
									found = True
if found:
	print(x, y, z, sep='\n')
else:
	print(-1)


(v1, v2, v3, vm) = map(int, input().split())
b = True
c1 = 2 * v1
c3 = max(v3, vm)
c2 = min(c1 - 1, 2 * v2)
b = c1 >= max(v1, 2 * vm + 1) and c3 <= min(2 * vm, 2 * v3) and (c2 >= max(2 * vm + 1, v2, c3 + 1))
if b:
	print(c1)
	print(c2)
	print(c3)
else:
	print(-1)


(v1, v2, v3, vm) = [int(x) for x in input().split()]
if vm <= 2 * v3 and vm < v2 and (2 * vm >= v3):
	c3 = v3
	c2 = v2
	for i in range(v3, v2 + 1):
		if c3 <= 2 * v3 and c3 < v2 and (c3 <= 2 * vm) and (c3 >= vm):
			break
		else:
			c3 += 1
	j = max(v2, 2 * vm)
	for i in range(j + 1):
		if c2 <= 2 * v2 and c2 > 2 * v3 and (c2 > 2 * vm):
			break
		else:
			c2 += 1
	if v1 > 2 * v3 and v1 > 2 * v2:
		print(v1)
	else:
		print(v1 * 2)
	print(c2)
	print(c3)
else:
	print(-1)


A = input()
A = [int(A.split()[val]) for val in range(len(A.split()))]
temp = -1
for i in range(A[0], 2 * A[0] + 1):
	for j in range(A[1], 2 * A[1] + 1):
		for k in range(A[2], 2 * A[2] + 1):
			if A[3] <= k and A[3] >= k / 2.0:
				temp = 1
				break
			else:
				temp = -1
		if temp == 1 and (A[3] > j or A[3] < j / 2.0) and (j > k):
			break
		else:
			temp = -1
	if temp == 1 and (A[3] > i or A[3] < i / 2.0) and (i > j):
		break
	else:
		temp = -1
if temp == 1:
	print(str(i) + '\n' + str(j) + '\n' + str(k))
if temp == -1:
	print('-1')


from sys import stdin, stdout

def maximo(a, b):
	if a > b:
		return a
	else:
		return b

def main():
	k = [int(c) for c in input().split()]
	if k[3] <= k[2] * 2:
		if k[2] > k[3]:
			if k[3] * 2 >= k[2]:
				print(2 * k[0])
				print(2 * k[1])
				print(maximo(k[2], k[3]))
			else:
				print(-1)
		elif k[3] * 2 >= k[1] * 2:
			print(-1)
		else:
			print(2 * k[0])
			print(2 * k[1])
			print(maximo(k[2], k[3]))
	else:
		print(-1)
main()


def first():
	(f, m, s, x) = map(int, input().split())
	flg = 0
	if x >= s:
		if 2 * s >= x:
			c = x
			flg = 1
	elif 2 * x >= s:
		c = s
		flg = 1
	if x >= f or x >= m:
		flg = 0
	if 2 * x >= m:
		m = 2 * x + 1
		if f <= m:
			f = m + 1
	if flg == 1:
		print(f)
		print(m)
		print(c)
	else:
		print(-1)
first()


(v1, v2, v3, vm) = map(int, input().split())
for v1_ in range(v1, v1 * 2 + 1):
	for v2_ in range(v2, v2 * 2 + 1):
		for v3_ in range(v3, v3 * 2 + 1):
			if vm <= v1_ and vm <= v2_ and (vm <= v3_) and (vm * 2 < v1_) and (vm * 2 < v2_) and (vm * 2 >= v3_):
				if v1_ > v2_ > v3_:
					print(v1_, v2_, v3_, sep=' ')
					exit()
print(-1)


(a, b, c, d) = map(int, input().split())
k = max(a, d)
l = max(b, d)
m = max(c, d)
for i in range(1, 201):
	for j in range(1, 201):
		for t in range(1, 201):
			if i > j > t and i >= k and (j >= l) and (t >= m) and (2 * a >= i) and (2 * b >= j) and (2 * c >= t) and (2 * d >= t) and (i > 2 * d) and (j > 2 * d):
				exit(print(i, j, t))
print(-1)


from sys import stdin, stdout
(v1, v2, v3, vm) = map(int, stdin.readline().split())
ans = []
for i in range(2 * v1, max(1, v1 - 1), -1):
	for j in range(min(2 * v2, i - 1), max(1, v2 - 1), -1):
		for z in range(min(2 * v3, j - 1), max(1, v3 - 1), -1):
			if 2 * vm < i and 2 * vm < j and (2 * vm >= z) and (vm <= z):
				ans = [i, j, z]
if not ans:
	stdout.write('-1')
else:
	stdout.write('\n'.join(list(map(str, ans))))


def run():
	(b1, b2, b3, m) = [int(x) for x in input().split()]
	if b1 <= m:
		print('-1')
		return
	if b2 <= m:
		print('-1')
		return
	if 2 * m < b3:
		print('-1')
		return
	if 2 * b3 < m:
		print('-1')
		return
	print(2 * b1)
	print(2 * b2)
	for x in range(m, 2 * m + 1):
		if b3 <= x <= 2 * b3:
			print(x)
			break
run()


(father_size, mother_size, son_size, masha_size) = list(map(int, input().split()))
son_car = 0
father_car = 0
mother_car = 0
t = max(masha_size, son_size)
for car_size in range(t, 201):
	if 2 * t >= car_size and 2 * son_size >= car_size and (2 * masha_size >= car_size):
		son_car = car_size
		break
for car_size in range(mother_size, 201):
	if 2 * mother_size >= car_size and car_size > 2 * t:
		mother_car = car_size
		break
for car_size in range(father_size, 201):
	if 2 * father_size >= car_size and car_size > mother_car:
		father_car = car_size
		break
if father_car and mother_car and son_car:
	print(father_car)
	print(mother_car)
	print(son_car)
else:
	print(-1)


def solve():
	(papa, mama, son, masha) = get([int])
	(small, med, large) = (None, None, None)

	def fit(person, car):
		return person <= car

	def likes(person, car):
		return car <= 2 * person

	def fitandlikes(person, car):
		return fit(person, car) and likes(person, car)
	for small in range(1, 301):
		if fitandlikes(masha, small) and fitandlikes(son, small):
			break
	else:
		return -1
	for med in range(small + 1, 301):
		if fitandlikes(mama, med) and (not likes(masha, med)):
			break
	else:
		return -1
	for large in range(med + 1, 301):
		if fitandlikes(papa, large) and (not likes(masha, large)):
			break
	else:
		return -1
	return '\n'.join(map(str, [large, med, small]))
_testcases = '\n50 30 10 10\n\n50\n30\n10\n\n\n\n\n\n100 50 10 21\n\n-1\n'.strip()
from bisect import bisect_left, bisect_right
from collections import defaultdict
from functools import lru_cache
from heapq import heapify, heappop, heappush
from operator import itemgetter, attrgetter
import bisect
import collections
import functools
import heapq
import itertools
import math
import operator
import re
import string
import sys
inf = float('inf')
cache = lru_cache(None)
sys.setrecursionlimit(10000)

def tree():
	return collections.defaultdict(tree)

def equal(x, y, epsilon=1e-06):
	if -epsilon <= x - y <= epsilon:
		return True
	if -epsilon <= x <= epsilon or -epsilon <= y <= epsilon:
		return False
	return -epsilon <= (x - y) / x <= epsilon or -epsilon <= (x - y) / y <= epsilon

def get(_type):
	if type(_type) == list:
		if len(_type) == 1:
			_type = _type[0]
			return list(map(_type, input().strip().split()))
		else:
			return [_type[i](inp) for (i, inp) in enumerate(input().strip().split())]
	else:
		return _type(input().strip())
printRecursionTree = timeit = lambda x: x
(_p, print) = (print, lambda *a, **b: None)
_p(solve())


(v1, v2, v3, vm) = map(int, input().split())
x = v1 * 2
y = v2 * 2
z = min(2 * v3, 2 * vm)
if vm <= z and vm * 2 >= z and (y > vm * 2) and (v3 <= z):
	print(x, y, z)
else:
	print(-1)


(fat, mot, son, mas) = input().split()
fat = int(fat)
mot = int(mot)
son = int(son)
mas = int(mas)
a = 0
b = 0
c = 0
tmp = 0
for i in range(fat, 2 * fat + 1):
	for j in range(mot, 2 * mot + 1):
		for k in range(son, 2 * son + 1):
			a = i
			b = j
			c = k
			if mas <= k and 2 * mas >= k and (2 * mas < j):
				if a > b > c:
					tmp = 1
			if tmp == 1:
				print(a)
				print(b)
				print(c)
				break
		if tmp == 1:
			break
	if tmp == 1:
		break
if tmp == 0:
	print(-1)


(father, mother, son, masha) = map(int, input().split())
if masha >= mother or masha > 2 * son or son > 2 * masha:
	print(-1)
else:
	print(2 * father)
	print(2 * mother)
	print(min(2 * son, 2 * masha))


import collections, heapq, itertools, math
groupby = itertools.groupby
rs = lambda : input()
ri = lambda : int(input())
rm = lambda : map(int, input().split())
rai = lambda : [int(x) for x in input().split()]

def solve(V1, V2, V3, Vm):
	for a in range(1, 202):
		for b in range(1, 202):
			for c in range(1, 202):
				if V1 <= a <= 2 * V1 and V2 <= b <= 2 * V2 and (V3 <= c <= 2 * V3) and (Vm <= c) and (a > b > c) and (b > 2 * Vm) and (c <= 2 * Vm):
					return (a, b, c)
	return (-1, 0, 0)
(V1, V2, V3, Vm) = rm()
(a, b, c) = solve(V1, V2, V3, Vm)
if a == -1:
	print(a)
else:
	print(a)
	print(b)
	print(c)


def cars(v1, v2, v3, vm):
	if vm > 2 * v3:
		return -1
	if 2 * vm >= 2 * v2:
		return -1
	for i in range(2 * v3, v3 - 1, -1):
		if vm <= i and 2 * vm >= i:
			return (2 * v1, 2 * v2, i)
	return -1
(v1, v2, v3, vm) = list(map(int, input().split()))
assert cars(50, 30, 10, 10) == (100, 60, 20)
assert cars(100, 50, 10, 21) == -1
if cars(v1, v2, v3, vm) == -1:
	print(-1)
else:
	for i in cars(v1, v2, v3, vm):
		print(i)


V = list(map(int, input().split()))
R = [0] * 3
L = [0] * 3
for i in range(3):
	if i != 2:
		R[i] = 2 * V[i]
		L[i] = max(V[i], 2 * V[3] + 1)
	else:
		R[i] = min(2 * V[i], 2 * V[3])
		L[i] = max(V[i], V[3])
ans = [-1] * 3
for i in range(3):
	if R[i] >= L[i]:
		if i == 0:
			ans[i] = R[i]
		else:
			for k in reversed(range(L[i], R[i] + 1)):
				if ans[i - 1] > k:
					ans[i] = k
					break
			else:
				print(-1)
	else:
		print(-1)
		exit()
print(*ans, sep='\n')


(x, y, z, t) = [int(i) for i in input().split()]
c = 0
m0 = 2 * x
for i in range(m0, x - 1, -1):
	m1 = min(i - 1, 2 * y)
	m1_ = max(2 * t, y - 1)
	judge = 0
	for j in range(m1, m1_, -1):
		m2 = min(j - 1, 2 * z, 2 * t)
		m2_ = max(z - 1, t - 1)
		flag = 0
		for k in range(m2, m2_, -1):
			print(i)
			print(j)
			print(k)
			c = 1
			flag = 1
			break
		if flag == 1:
			judge = 1
			break
	if judge == 1:
		break
if c == 0:
	print(-1)


import sys
import math
(a, b, c, d) = map(int, input().split())
for i in range(201):
	for j in range(i):
		for k in range(j):
			if a <= i and 2 * a >= i and (2 * d < i) and (d <= i):
				if b <= j and 2 * b >= j and (2 * d < j) and (d <= j):
					if c <= k and 2 * c >= k and (2 * d >= k) and (d <= k):
						print(i)
						print(j)
						print(k)
						sys.exit()
print(-1)


(a, b, c, d) = map(int, input().split())
flag = 0
for i in range(a, 2 * a + 1):
	for j in range(b, 2 * b + 1):
		for k in range(c, 2 * c + 1):
			if i >= a and 2 * a >= i and (j >= b) and (2 * b >= j) and (k >= c) and (2 * c >= k) and (i > j > k) and (d <= k) and (2 * d >= k) and (2 * d < i) and (2 * d < j):
				flag = 1
				print(i)
				print(j)
				print(k)
				exit(0)
if not flag:
	print(-1)


import sys
data = input().split(' ')
v1 = int(data[0])
v2 = int(data[1])
v3 = int(data[2])
vm = int(data[3])
a3min = max(v3, vm)
a3max = min(vm * 2, v3 * 2)
if a3max < a3min:
	print('-1')
	exit()
a2min = max(v2, vm * 2 + 1)
if a2min <= a3min:
	a2min = a3min + 1
a2max = v2 * 2
if a2max < a2min:
	print('-1')
	exit()
a1min = max(v1, vm * 2 + 1)
if a1min <= a2min:
	a1min = a2min + 1
a1max = v1 * 2
if a1max < a1min:
	print('-1')
	exit()
print('{}\n{}\n{}'.format(a1min, a2min, a3min))


(v1, v2, v3, vm) = map(int, input().split())
a1 = -1
for i in range(2 * v3, v3 - 1, -1):
	if 2 * vm >= i and vm <= i:
		a1 = i
		break
if a1 == -1:
	print(-1)
elif 2 * v2 < 2 * vm + 1:
	print(-1)
else:
	a2 = min(max(2 * a1 + 1, v2), 2 * v2)
	a3 = min(max(2 * a2 + 1, v1), 2 * v1)
	print(a3)
	print(a2)
	print(a1)


(f, m, s, ma) = [int(x) for x in input().split()]
b = max(m, 2 * ma + 1)
c = max(f, b + 1)
a = max(ma, s)
if a <= 2 * s and a <= 2 * ma and (b <= 2 * m) and (c <= 2 * f):
	print(c)
	print(b)
	print(a)
else:
	print(-1)


X = input()
x = X.split()
dad = int(x[0])
mom = int(x[1])
son = int(x[2])
masha = int(x[3])
flag = 0
if masha > 2 * son:
	print(-1)
	flag = 1
elif son <= masha <= 2 * son:
	c = masha
else:
	c = 2 * masha
if flag != 1 and c < son:
	print(-1)
	flag = 1
if 2 * masha >= 2 * dad or (2 * masha >= 2 * mom and flag == 0):
	print(-1)
	flag = 1
if flag == 0:
	print(2 * dad)
	print(2 * mom)
	print(c)


import sys
import os
from math import *
input = sys.stdin.buffer.readline
(v1, v2, v3, vm) = map(int, input().split())
if vm > 2 * v3 or 2 * vm < v3:
	print('-1')
elif vm >= v2:
	print('-1')
else:
	if max(v2, 2 * vm + 1) == max(v1, 2 * vm + 1):
		print(max(v1, 2 * vm + 2))
		print(max(v2, 2 * vm + 1))
	else:
		print(max(v1, 2 * vm + 1))
		print(max(v2, 2 * vm + 1))
	print(max(v3, vm))


def sai(arg):
	(f, m, s, ma) = arg
	for fc in range(f, 2 * f + 1):
		for mc in range(m, min(2 * m + 1, fc)):
			for sc in range(max(s, ma), min(2 * s + 1, mc)):
				if 2 * ma >= sc and 2 * ma < mc:
					return '\n'.join(map(str, [fc, mc, sc]))
	return -1
print(sai(map(int, input().split())))


sizes = [int(i) for i in input().split()]
if sizes[3] > sizes[2] * 2 or sizes[3] >= sizes[1] or 2 * sizes[3] < sizes[2]:
	print(-1)
else:
	fcar = max(sizes[0], 2 * sizes[3]) + 1
	mcar = max(sizes[1], 2 * sizes[3]) + 1
	if fcar == mcar:
		fcar += 1
	print(fcar)
	print(mcar)
	print(max(sizes[2], sizes[3]))


en = list(map(int, input().split()))
(a, b, c, d) = (en[0], en[1], en[2], en[3])
aux = max(c, d)
if 2 * c >= aux and 2 * d >= aux and (2 * d < 2 * a) and (2 * d < 2 * b):
	print(2 * a)
	print(2 * b)
	print(aux)
else:
	print(-1)


def printCarros():
	for i in carros:
		print(i)
u = [int(i) for i in input().split()]
m = u[3]
if m * 2 >= u[2] and m <= u[2] * 2 and (m < u[1]):
	print(u[0] * 2)
	print(u[1] * 2)
	print(max(m, u[2]))
else:
	print(-1)


(v1, v2, v3, vm) = input().split(' ')
v1 = int(v1)
v2 = int(v2)
v3 = int(v3)
vm = int(vm)
flag = False
C = max(vm, v3)
B = max(max(C + 1, 2 * vm + 1), v2)
A = max(max(B + 1, 2 * vm + 1), v1)
if min(2 * vm, 2 * v3) - C < 0:
	flag = True
if 2 * v2 - B < 0:
	flag = True
if 2 * v1 - A < 0:
	flag = True
if flag:
	print(-1)
else:
	print(str(A) + '\n' + str(B) + '\n' + str(C))


sizes = [int(i) for i in input().split()]
fat = sizes[0]
mot = sizes[1]
son = sizes[2]
m = sizes[3]
fat_specs = [max(fat, 2 * m + 1), fat * 2]
mot_specs = [max(mot, 2 * m + 1), mot * 2]
son_specs = [max(son, m), min(son * 2, m * 2)]
if fat < m or mot < m:
	print(-1)
elif fat_specs[1] - fat_specs[0] > -1 and mot_specs[1] - mot_specs[0] > -1 and (son_specs[1] - son_specs[0] > -1):
	print(fat_specs[1], mot_specs[0], son_specs[0], sep='\n')
else:
	print(-1)


V = list(map(int, input().split()))
C = [V[0], V[1], V[2]]
if C[2] < V[3]:
	C[2] = V[3]
if C[1] <= C[2]:
	C[1] = C[2] + 1
if C[0] <= C[1]:
	C[0] = C[1] + 1
while 2 * V[3] >= C[1]:
	C[1] += 1
while 2 * V[3] >= C[0]:
	C[0] += 1
if C[0] <= C[1]:
	C[0] = C[1] + 1
C.append(C[2])
likes = True
for (i, b) in enumerate(C):
	if 2 * V[i] < b:
		likes = False
if likes:
	print(' '.join(map(str, C[:3])))
else:
	print(-1)


def main():
	(a, b, c, d) = map(int, input().split())
	if b > d <= c * 2 <= d * 4:
		print(a * 2, b * 2, max(c, d), sep='\n')
	else:
		print(-1)
main()


(V1, V2, V3, VM) = map(int, input().split())
a = [0] * 3
a[0] = max(2 * VM + 2, V1)
a[1] = max(2 * VM + 1, V2)
a[2] = max(VM, V3)
if 2 * V1 < a[0] or 2 * V2 < a[1] or 2 * V3 < a[2] or (2 * VM < a[2]):
	print(-1)
else:
	for i in a:
		print(i)