#include<iostream>

using namespace std;
int main{
    int N,A,a1,a2,a3,bs,A1;
    cin>>N>>A;
    if(bs==5){
        A1=N-5A;
    }
    if(bs==4){
        A1=N-4A;
    }    
    if(bs==3){
        A1=N-3A;
    }
    if(N!=>3A){
        cout<<"-1";
    }
    else{
        cin>>a1,b1,c1;
        if(a1+a2+a3!=A1){
            cout<<"-1";
        }
        else{
            cout<<A <<a1<<endl;
            cout<<A <<a2<<endl;
            cout<<A <<a3<<endl;
        }
    }
}