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

public class robot_ats implements Runnable {
	public static void main(String[] args) {
		new Thread(new robot_ats()).start();
	}

	BufferedReader br;
	StringTokenizer in;
	PrintWriter out;

	public String nextToken() throws IOException {
		while (in == null || !in.hasMoreTokens()) {
			in = new StringTokenizer(br.readLine());
		}
		return in.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	final int[] dx = { 0, 1, 0, -1 };
	final int[] dy = { 1, 0, -1, 0 };

	public void solve() throws IOException {
		int finalX = nextInt();
		int finalY = nextInt();
		int k = nextInt();
		String turn = "";
		if (k > 1)
		  turn = nextToken();
		int dir = 0;
		int curX = 0;
		int curY = 0;
		int[] dirFound = new int[4];
		Arrays.fill(dirFound, -1);
		int[] ans = new int[k];
		for (int i = 0; i < k; i++) {
			
			dir = (dir + 4) % 4;
			dirFound[dir] = i;
			ans[i] = 1;
			curX += dx[dir];
			curY += dy[dir];
			if (i == k - 1)
				continue;
			if (turn.charAt(i) == 'R')
				dir++;
			else
				dir--;
		}
		if (curX < finalX) {
			if (dirFound[1] == -1) {
				fail();
			}
			ans[dirFound[1]] += finalX - curX;
		}
		if (curX > finalX) {
			if (dirFound[3] == -1) {
				fail();
			}
			ans[dirFound[3]] += curX - finalX;
		}
		if (curY < finalY) {
			if (dirFound[0] == -1) {
				fail();
			}
			ans[dirFound[0]] += finalY - curY;
		}
		if (curY > finalY) {
			if (dirFound[2] == -1) {
				fail();
			}
			ans[dirFound[2]] += curY - finalY;
		}
		for (int i = 0; i < ans.length; i++)
			out.print(ans[i] + " ");
		out.println();
	}

	public void fail() {
		out.println("Impossible");
		out.close();
		System.exit(0);
	}

	public void run() {
		try {
			br = new BufferedReader(new FileReader("robot.in"));
			out = new PrintWriter("robot.out");

			solve();

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