#include #include using namespace std; int main() { vector a(10); int first = -1, second = -1; for (int i = 0; i < 10; ++i) { cin >> a[i]; if (a[i] > 0) { if (first == -1) first = i; else second = i; } } if ((a[second] - a[first]) % (second - first) != 0) { cout << -1 << endl; } else { int d = (a[second] - a[first]) / (second - first); for (int i = 0; i < 10; ++i) { cout << a[first] + (i - first) * d; if (i < 9) cout << " "; } cout << endl; } }