#include using namespace std; using ll = long long; constexpr char newl = '\n'; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll n; cin >> n; vector ans(3, 0); int tar = 0; for (int i = 30; i >= 0; i--) { if (n >> i & 1) { for (int j = 0; j < 3; j++) { if (j == tar) continue; ans[j] |= (1LL << i); } tar = (tar + 1) % 3; } } sort(ans.begin(), ans.end()); if (ans[0] == 0) { cout << "-1 -1 -1\n"; } else { cout << ans[0] << " " << ans[1] << " " << ans[2] << newl; } return 0; }