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

public class robot_nn implements Runnable {
    public static void main(String[] args) {
        new robot_nn().run();
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;
        boolean eof;
        String buf;

        public FastScanner(String fileName) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(fileName));
            nextToken();
        }

        public FastScanner(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream));
            nextToken();
        }

        String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    eof = true;
                    break;
                }
            }
            String ret = buf;
            buf = eof ? "-1" : st.nextToken();
            return ret;
        }

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

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

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

        void close() {
            try {
                br.close();
            } catch (Exception e) {

            }
        }

        boolean isEOF() {
            return eof;
        }
    }

    FastScanner sc;
    PrintWriter out;

    private static final String FN = "robot";

    public void run() {
        Locale.setDefault(Locale.US);
        try {
            sc = new FastScanner(FN + ".in");
            out = new PrintWriter(FN + ".out");
            solve();
            sc.close();
            out.close();
        } catch (Throwable e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    void doAssert(boolean isRight, String s) {
        if (!isRight)
            throw new AssertionError(s);
    }

    final int MAXX = 100000;

    final int[] DX = { 0, 1, 0, -1 };
    final int[] DY = { 1, 0, -1, 0 };

    int turnRight(int dir) {
        return (dir + 1) % 4;
    }

    int turnLeft(int dir) {
        return (dir + 3) % 4;
    }

    private void solve() {
        int fx = sc.nextInt();
        int fy = sc.nextInt();
        doAssert(Math.abs(fx) <= MAXX && Math.abs(fy) <= MAXX,
                "final point's coordinates are out of range");
        int n = sc.nextInt();
        doAssert(1 <= n && n <= 100000, "n is out of range");
        char[] turns;
        if (!sc.isEOF()) {
            turns = sc.nextToken().toCharArray();
        } else {
            turns = new char[0];
        }
        doAssert(n == turns.length + 1,
                "the length of the string isn't equal to (n - 1)");
        int[] direction = new int[n];
        int[] was = new int[4];
        for (int i = 0, dir = 0; i < n; i++) {
            direction[i] = dir;
            ++was[dir];
            if (i == n - 1)
                break;
            if (turns[i] == 'L') {
                dir = turnLeft(dir);
            } else {
                dir = turnRight(dir);
            }
        }
        if (was[0] == 0 && was[2] == 0 && fy != 0 || was[1] == 0 && was[3] == 0
                && fx != 0) {
            out.println("Impossible");
            return;
        }
        if (was[2] == 0 && was[0] > fy || was[0] == 0 && was[2] < fy
                || was[1] == 0 && was[3] < fx || was[3] == 0 && was[2] > fx) {
            out.println("Impossible");
            return;
        }
        int[] ans = new int[n];
        for (int i = 0; i < n; i++) {
            ans[i] = 1;
            fx -= DX[direction[i]] * ans[i];
            fy -= DY[direction[i]] * ans[i];
        }
        for (int i = 0; i < n; i++) {
            if (fx != 0 && DX[direction[i]] != 0
                    && (fx ^ DX[direction[i]]) >= 0) {
                ans[i] += Math.abs(fx);
                fx = 0;
            }
            if (fy != 0 && DY[direction[i]] != 0
                    && (fy ^ DY[direction[i]]) >= 0) {
                ans[i] += Math.abs(fy);
                fy = 0;
            }
        }
        for (int i = 0; i < n; i++) {
            if (i > 0) {
                out.print(" ");
            }
            out.print(ans[i]);
        }
        out.println();
    }
}
