#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int mod = 1000000007;

int main() {
    ios::sync_with_stdio(false);
    int n, k, d[4019][4019] = {1}, p[4019] = {1};
    cin >> k >> n;
    for (int i = 1; i <= 4000; i++) {
        d[i][0] = 1;
        for (int j = 1; j <= i; j++) {
            d[i][j] = d[i - 1][j - 1] + d[i - 1][j];
            if (d[i][j] >= 998244353) d[i][j] -= 998244353;
        }
        p[i] = p[i - 1] + p[i - 1];
        if (p[i] >= 998244353) p[i] -= 998244353;
    }
    for (int i = 2; i <= k + k; i++) {
        ll z = 0;
        int a, b, c;
        if (i % 2) c = 0;
        else c = 1;
        if (i <= k) b = (i - 1) / 2;
        else b = (k + k + 1 - i) / 2;
        a = k - b - b - c;
        //cout << a << ' ' << b << ' ' << c << ' ';
        for (int j = 0; j <= b; j++) {
            if (n >= j) z = (z + 1ll * d[n + a - 1][n - j] * d[b][j] % 998244353 * p[j]) % 998244353;
            if (c && n > j) z = (z + 1ll * d[n + a - 2][n - j - 1] * d[b][j] % 998244353 * p[j]) % 998244353;
        }
        cout << z << '\n';
    }
}

#include<bits/stdc++.h>
#define mod 998244353
#define maxn 1000005
using namespace std;
typedef long long LL;
int read()
{
    char c=getchar();int f=1,sum=0;
    while(c<'0' || c>'9'){if(c=='-')f=-1;c=getchar();}
    while(c>='0' && c<='9'){sum=sum*10+c-'0';c=getchar();}
    return sum*f;
}
int n,m;
LL fac[maxn],inv[maxn],ans;
LL ksm(LL a,LL b){LL ret=1;while(b){if(b&1) ret=ret*a%mod;a=a*a%mod;b>>=1;}return ret;}
void init(int x)
{
	fac[0]=1;
	for(int i=1;i<=x;i++) fac[i]=fac[i-1]*i%mod;
	inv[x]=ksm(fac[x],mod-2);
	for(int i=x;i>=1;i--) inv[i-1]=inv[i]*i%mod;
}
LL calc(LL x,LL y){return fac[x+y]*inv[x]%mod*inv[y]%mod;}
int main()
{
	n=read();m=read();
	if(n>m) swap(n,m);
	init(n+m);
	for(int i=1;i<=n;i++) ans+=calc(i,i)*calc(n-i,m-i)%mod;
    ans=ans%mod*ksm(calc(n,m)<<1,mod-2)%mod;
    printf("%lld\n",(ans+m)%mod);
	return 0;
}
