The Robot is in a rectangular maze of size n × m. Each cell of the maze is either empty or occupied by an obstacle. The Robot can move between neighboring cells on the side left (the symbol "L"), right (the symbol "R"), up (the symbol "U") or down (the symbol "D"). The Robot can move to the cell only if it is empty. Initially, the Robot is in the empty cell.

Your task is to find lexicographically minimal Robot's cycle with length exactly k, which begins and ends in the cell where the Robot was initially. It is allowed to the Robot to visit any cell many times (including starting).

Consider that Robot's way is given as a line which consists of symbols "L", "R", "U" and "D". For example, if firstly the Robot goes down, then left, then right and up, it means that his way is written as "DLRU".

In this task you don't need to minimize the length of the way. Find the minimum lexicographical (in alphabet order as in the dictionary) line which satisfies requirements above.

Input

The first line contains three integers n, m and k (1 ≤ n, m ≤ 1000, 1 ≤ k ≤ 106) — the size of the maze and the length of the cycle. 

Each of the following n lines contains m symbols — the description of the maze. If the symbol equals to "." the current cell is empty. If the symbol equals to "*" the current cell is occupied by an obstacle. If the symbol equals to "X" then initially the Robot is in this cell and it is empty. It is guaranteed that the symbol "X" is found in the maze exactly once. 

Output

Print the lexicographically minimum Robot's way with the length exactly k, which starts and ends in the cell where initially Robot is. If there is no such way, print "IMPOSSIBLE"(without quotes).

Examples

Input

2 3 2
.**
X..


Output

RL


Input

5 6 14
..***.
*...X.
..*...
..*.**
....*.


Output

DLDDLLLRRRUURU


Input

3 3 4
***
*X*
***


Output

IMPOSSIBLE

Note

In the first sample two cyclic ways for the Robot with the length 2 exist — "UD" and "RL". The second cycle is lexicographically less. 

In the second sample the Robot should move in the following way: down, left, down, down, left, left, left, right, right, right, up, up, right, up. 

In the third sample the Robot can't move to the neighboring cells, because they are occupied by obstacles.
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.util.AbstractCollection;
import java.io.OutputStreamWriter;
import java.util.LinkedList;
import java.util.NoSuchElementException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.Collections;
import java.io.InputStream;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int MAX = 1000 * 1000 * 1000;
            int[] deltaRow = {1, 0, 0, -1}, deltaCol = {0, -1, 1, 0};
            int rows = in.readInt(), cols = in.readInt(), k = in.readInt();
            char[][] tab = new char[rows][];
            for (int row = 0; row < rows; row++) tab[row] = in.next().toCharArray();
            int[][] distance = new int[rows][cols];
            ArrayUtils.fill(distance, MAX);
            int startRow = -1, startCol = -1;
            for (int row = 0; row < rows; row++) {
                startCol = ArrayUtils.find(tab[row], 'X');
                if (startCol != -1) {
                    startRow = row;
                    break;
                }
            }
            LinkedList<State> queue = new LinkedList<>(Collections.singleton(new State(startRow, startCol, 0)));
            while (!queue.isEmpty()) {
                State cur = queue.pollFirst();
                if (distance[cur.r][cur.c] != MAX) continue;
                distance[cur.r][cur.c] = cur.d;
                for (int dir = 0; dir < 4; dir++) {
                    int newRow = cur.r + deltaRow[dir], newCol = cur.c + deltaCol[dir];
                    if (MiscUtils.isValidCell(newRow, newCol, rows, cols) && tab[newRow][newCol] != '*') {
                        queue.addLast(new State(newRow, newCol, cur.d + 1));
                    }
                }
            }
            int row = startRow, col = startCol;
            ArrayList<Integer> answer = new ArrayList<>();
            for (int remaining = k; remaining > 0; remaining--) {
                for (int direction = 0; direction < 5; direction++) {
                    if (direction == 4) {
                        out.printLine("IMPOSSIBLE");
                        return;
                    }
                    int newRow = row + deltaRow[direction], newCol = col + deltaCol[direction];
                    if (MiscUtils.isValidCell(newRow, newCol, rows, cols) && distance[newRow][newCol] <= remaining - 1) {
                        answer.add(direction);
                        row = newRow;
                        col = newCol;
                        break;
                    }
                }
            }
            for (int dir : answer) out.print("DLRU".charAt(dir));
            out.printLine();
        }

        class State {
            int r;
            int c;
            int d;

            public State(int r, int c, int d) {
                this.r = r;
                this.c = c;
                this.d = d;
            }
        }
    }
    static class CharArray extends CharAbstractStream implements CharList {
        private char[] data;

        public CharArray(char[] arr) {
            data = arr;
        }

        public int size() {
            return data.length;
        }

        public char get(int at) {
            return data[at];
        }

        public void removeAt(int index) {
            throw new UnsupportedOperationException();
        }
    }
    static interface CharIterator {
        public char value() throws NoSuchElementException;
        public boolean advance();
        public boolean isValid();
    }
    static interface CharCollection extends CharStream {
        public int size();
    }
    static interface CharStream extends Iterable<Character>, Comparable<CharStream> {
        public CharIterator charIterator();
        default public Iterator<Character> iterator() {
            return new Iterator<Character>() {
                private CharIterator it = charIterator();

                public boolean hasNext() {
                    return it.isValid();
                }

                public Character next() {
                    char result = it.value();
                    it.advance();
                    return result;
                }
            };
        }
        default public int compareTo(CharStream c) {
            CharIterator it = charIterator();
            CharIterator jt = c.charIterator();
            while (it.isValid() && jt.isValid()) {
                char i = it.value();
                char j = jt.value();
                if (i < j) {
                    return -1;
                } else if (i > j) {
                    return 1;
                }
                it.advance();
                jt.advance();
            }
            if (it.isValid()) {
                return 1;
            }
            if (jt.isValid()) {
                return -1;
            }
            return 0;
        }
    }
    static abstract class CharAbstractStream implements CharStream {
        public String toString() {
            StringBuilder builder = new StringBuilder();
            boolean first = true;
            for (CharIterator it = charIterator(); it.isValid(); it.advance()) {
                if (first) {
                    first = false;
                } else {
                    builder.append(' ');
                }
                builder.append(it.value());
            }
            return builder.toString();
        }

        public boolean equals(Object o) {
            if (!(o instanceof CharStream)) {
                return false;
            }
            CharStream c = (CharStream) o;
            CharIterator it = charIterator();
            CharIterator jt = c.charIterator();
            while (it.isValid() && jt.isValid()) {
                if (it.value() != jt.value()) {
                    return false;
                }
                it.advance();
                jt.advance();
            }
            return !it.isValid() && !jt.isValid();
        }

        public int hashCode() {
            int result = 0;
            for (CharIterator it = charIterator(); it.isValid(); it.advance()) {
                result *= 31;
                result += it.value();
            }
            return result;
        }
    }
    static interface CharReversableCollection extends CharCollection {
    }
    static class ArrayUtils {
        public static void fill(int[][] array, int value) {
            for (int[] row : array) {
                Arrays.fill(row, value);
            }
        }

        public static int find(char[] array, char value) {
            return new CharArray(array).find(value);
        }
    }
    static class MiscUtils {
        public static boolean isValidCell(int row, int column, int rowCount, int columnCount) {
            return row >= 0 && row < rowCount && column >= 0 && column < columnCount;
        }
    }
    static interface CharList extends CharReversableCollection {
        public abstract char get(int index);
        public abstract void removeAt(int index);
        default public CharIterator charIterator() {
            return new CharIterator() {
                private int at;
                private boolean removed;

                public char value() {
                    if (removed) {
                        throw new IllegalStateException();
                    }
                    return get(at);
                }

                public boolean advance() {
                    at++;
                    removed = false;
                    return isValid();
                }

                public boolean isValid() {
                    return !removed && at < size();
                }

                public void remove() {
                    removeAt(at);
                    at--;
                    removed = true;
                }
            };
        }
        default public int find(char value) {
            int size = size();
            for (int i = 0; i < size; i++) {
                if (get(i) == value) {
                    return i;
                }
            }
            return -1;
        }
    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void printLine() {
            writer.println();
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void print(char i) {
            writer.print(i);
        }

        public void close() {
            writer.close();
        }
    }
}

