import std.stdio, std.string, std.conv, std.algorithm, std.numeric;
import std.range, std.array, std.math, std.typecons, std.container, core.bitop;

void main() {
    int a,b,c,d;
    scan(a,b,c,d);

    foreach (i ; a .. 2*a + 1) {
        foreach (j ; b .. min(i, 2*b + 1)) {
            foreach (k ; c .. min(j, 2*c + 1)) {
                if (d <= k && k <= 2*d && j > 2*d) {
                    writeln(i);
                    writeln(j);
                    writeln(k);
                    return;
                }
            }
        }
    }

    writeln(-1);
}

void solve(int a, int L) {
    auto as = new int[](21);
    as[0] = a;

    foreach (i ; 1 .. 21) {
        as[i] = calmax(as[i-1], L) - calmin(as[i-1], L);

        foreach (j ; 0 .. i) {
            if (as[i] == as[j]) {
                writeln(j, " ", as[i], " ", i-j);
                return;
            }
        }
    }
}

int calmax(int x, int L) {
    auto cnt = new int[](10);

    while (x > 0) {
        cnt[x % 10]++;
        x /= 10;
    }

    cnt[0] += max(0, L - cnt.sum);

    int res;
    foreach_reverse (i ; 0 .. 10) {
        foreach (j ; 0 .. cnt[i]) {
            res *= 10;
            res += i;
        }
    }

    debug {
        writeln(res);
    }

    return res;
}

int calmin(int x, int L) {
    auto cnt = new int[](10);

    while (x > 0) {
        cnt[x % 10]++;
        x /= 10;
    }

    cnt[0] += max(0, L - cnt.sum);
    
    int res;
    foreach (i ; 0 .. 10) {
        foreach (j ; 0 .. cnt[i]) {
            res *= 10;
            res += i;
        }
    }

    debug {
        writeln(res);
    }

    return res;
}

void scan(T...)(ref T args) {
    string[] line = readln.split;
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}


void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}