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

public class bender_ab_wa implements Runnable {

	final int MAXN = 100000;
	final int MAXK = 10;	
	
	private void solve() throws IOException {
		int n = in.nextInt();
		assert 1 <= n && n <= MAXN;
		int k = in.nextInt();
		assert 1 <= k && k <= MAXK;
		int r = in.nextInt();
		assert 1 <= r && r <= k;
		int l = in.nextInt();
		assert 1 <= l && l <= k;
		
		r %= k;
		l %= k;
		
		for (int a = 0; a < k; ++a) {
			for (int b = 0; b < k; ++b) {
				for (int c = 0; c < k; ++c) {
					int p = r;
					int x = c;
					for (int i = 0; i < n; ++i) {
						int y = x + 1;
						if (y >= k) {
							y = 0;						
						}
						if (x == p) {
							p = y;						
						} else if (y == p) {
							p = x;
						}
						x = (a * x + b) % k;
					}
					if (p == l) {
						out.println(a + " " + b + " " + c);
						return;
					}
				}
			}
		}
		out.println("Impossible");
	}

	final String FILE_NAME = "bender";

	SimpleScanner in;
	PrintWriter out;

	@Override
	public void run() {
		try {
			in = new SimpleScanner(new FileReader(FILE_NAME + ".in"));
			out = new PrintWriter(FILE_NAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(-1);
		}
	}

	public static void main(String[] args) {
		new Thread(new bender_ab_wa()).start();
	}

	class SimpleScanner extends BufferedReader {

		private StringTokenizer st;
		private boolean eof;

		public SimpleScanner(Reader a) {
			super(a);
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(readLine());
				} catch (Exception e) {
					eof = true;
					return "";
				}
			}
			return st.nextToken();
		}

		boolean seekEof() {
			String s = next();
			if ("".equals(s) && eof)
				return true;
			st = new StringTokenizer(s + " " + st.toString());
			return false;
		}

		private String cnv(String s) {
			if (s.length() == 0)
				return "0";
			return s;
		}

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

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

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