#include #include using namespace std; void solve() { int n; cin >> n; vector ans(3, 0); int s = 0; for (int i = 0; i < 30; ++i) { if ((~n >> i) & 1) continue; for (int j = 0; j < 3; ++j) { if (j != s) ans[j] |= (1 << i); } (++s) %= 3; } for (auto x : ans) { if (x == 0) { for (auto& y : ans) y = -1; } } for (auto x : ans) cout << x << " "; cout << "\n"; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); solve(); return 0; }