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

public class robot_av implements Runnable {
	public static void main(String[] args) {
		new Thread(new robot_av()).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());
	}

	public void solve() throws IOException {
		int xf = nextInt();
		int yf = nextInt();
		
		int[] dx = new int[]{1, 0, -1, 0};
		int[] dy = new int[]{0, 1, 0, -1};
		
		int x = 0;
		int y = 0;
		int z = 1;
		
		int[] c = new int[4];
		Arrays.fill(c, -1);
		c[1] = 0;
		x += dx[z];
		y += dy[z];
		int n = nextInt();
		if (n > 1){
			String S = nextToken();
			for (int i = 0; i < n - 1; i++) {
				if (S.charAt(i) == 'R'){
					z = (z + 3) % 4;				
				}else{
					z = (z + 1) % 4;
				}
				c[z] = i + 1;
			
				x += dx[z];
				y += dy[z];
			}
		}
		
		if (x < xf && c[0] == -1){
			out.println("Impossible");
			return;
		}
		
		if (y < yf && c[1] == -1){
			out.println("Impossible");
			return;
		}
		
		if (x > xf && c[2] == -1){
			out.println("Impossible");
			return;
		}
		
		if (y > yf && c[3] == -1){
			out.println("Impossible");
			return;
		}
		
		int[] dz = new int[n];
		for (int i = 0; i < n; i++) {
			dz[i] = 1;
		}
		
		if (x < xf){
			dz[c[0]] += (xf - x);
		}
		
		if (y < yf){
			dz[c[1]] += (yf - y);
		}
		
		if (x > xf){
			dz[c[2]] += (x - xf);
		}
		
		if (y > yf){
			dz[c[3]] += (y - yf);
		}
		
		for (int i = 0; i < n; i++) {
			out.print(dz[i] + " ");
		}
	}

	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);
		}
	}
}
