input 5 ____ 10 1 20 22

output 15 19 25 7 ___ 49

please help me solve