#include <iostream>using namespace std;int main(){ int t; cin>>t; for(int k=0;k<t;++k) { long long x; cin>>x; cout<<4294967295-x<<endl; }}