import java.util.*;
import java.io.*;
import java.math.BigInteger;

public class E {
	FastScanner in;
	PrintWriter out;
	boolean systemIO = true;

	
	
	public void solve() {
		long mod = 998244353;
		long n = in.nextLong();
		long k = in.nextLong() - 1;
		long[][] f = new long[(int) (n + 1)][(int) (n + 1)];
		long[][] g = new long[(int) (n + 1)][(int) (n + 1)];
		f[0][0] = 2;
		for (int i = 0; i < g.length; i++) {
			g[0][i] = 2;
		}
		f[1][1] = 2;
		for (int i = 1; i < g.length; i++) {
			g[1][i] = 2;
		}
		for (int i = 2; i < g.length; i++) {
			for (int j = 1; j < g.length; j++) {
				f[i][j] = 2 * f[i - 1][j] % mod;
				if (i >= j + 1) {
					f[i][j] = (f[i][j] + mod - g[i - j - 1][j]) % mod;
				}
				if (i >= j) {
					f[i][j] += g[i - j][j - 1];
				}
				f[i][j] %= mod;
				g[i][j] = g[i - 1][j] * 2 % mod;
				if (i >= j + 1) {
					g[i][j] += mod - g[i - j - 1][j];
					g[i][j] %= mod;
				}
			}
		}
		for (int i = 0; i < g.length; i++) {
			out.print(f[(int) n][i] + " ");
		}
		out.println();
		for (int i = 0; i < g.length; i++) {
			out.print(g[(int) n][i] + " ");
		}
		out.println();
		long ans = 0;
		for (int i = 1; i < g.length; i++) {
			ans += f[(int) n][i] * Math.min(g[(int) n][(int) (k / i)], g[(int) n][(int) n]) / 2;
//			System.out.println(i + " " + f[(int) n][i] * g[(int) n][(int) (k / i)]);
			ans %= mod;
		}
		out.println(ans);
	}

	public void run() {
		try {
			if (systemIO) {
				in = new FastScanner(System.in);
				out = new PrintWriter(System.out);
			} else {
				in = new FastScanner(new File("segments.in"));
				out = new PrintWriter(new File("segments.out"));
			}
			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

		String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				return null;
			}
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

	}

	// AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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