#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const int inf=1<<30; const ll INF=1LL<<62; typedef pair P; typedef pair PP; const ll MOD=998244353; string f(ll x){ string res=""; while(x>0){ res+=to_string(x%2); x/=2; } reverse(res.begin(),res.end()); return res; } int main(){ ll N,X,Y; cin>>N>>X>>Y; string S=f(X); string T=f(Y); while(S.size()