#include using namespace std; #include using namespace atcoder; using mint=modint998244353; //1000000007; using ll=long long; using pp=pair; #define sr string #define vc vector #define fi first #define se second #define rep(i,n) for(int i=0;i<(int)n;i++) #define pb push_back #define all(v) v.begin(),v.end() #define pque priority_queue #define bpc(a) __builtin_popcount(a) struct divs{ int n; vector f, primes; divs(int n=1):n(n), f(n+1) { f[0] = f[1] = -1; for (ll i = 2; i <= n; ++i) { if (f[i]) continue; primes.push_back(i); f[i] = i; for (ll j = i*i; j <= n; j += i) { if (!f[j]) f[j] = i; } } } bool isPrime(int x) { return f[x] == x;} vector factorList(int x) { vector res; while (x != 1) { res.push_back(f[x]); x /= f[x]; } return res; } vector> factor(int x) { vector fl = factorList(x); if (fl.size() == 0) return {}; vector> res(1, pair(fl[0], 0)); for (int p : fl) { if (res.back().first == p) { res.back().second++; } else { res.emplace_back(p, 1); } } return res; } }; int main(){ int n,l,r;cin>>n>>l>>r; if(l==1&&r==1){ cout<<1; return 0; } if(l==1||r==1){ cout<<2; return 0; } vca(n); rep(i,n)a[i]=i; rep(i,l)a[i]=l-1-i; auto pre=a; rep(i,r)a[n-r+i]=pre[n-1-i]; dsu d(n); rep(i,n)d.merge(i,a[i]); mapm; divs di(n); rep(i,n)if(d.leader(i)==i){ int t=d.size(i); for(auto [x,y]:di.factor(t)){ m[x]=max(m[x],y); } } mint ans=2; for(auto [x,y]:m)ans*=mint(x).pow(y); //rep(i,n)cout<