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.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.util.Collection;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Jialin Ouyang (Jialin.Ouyang@gmail.com)
 */
public class Main {
  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    QuickScanner in = new QuickScanner(inputStream);
    QuickWriter out = new QuickWriter(outputStream);
    TaskC solver = new TaskC();
    solver.solve(1, in, out);
    out.close();
  }

  static class TaskC {
    static int INF = Integer.MAX_VALUE >> 1;
    static char[] D = new char[]{'D', 'L', 'R', 'U'};
    static int[] DX = new int[]{1, 0, 0, -1};
    static int[] DY = new int[]{0, -1, 1, 0};
    int n;
    int m;
    int nm;
    int length;
    int[][] dist;
    char[][] board;
    IntArrayQueue queueX;
    IntArrayQueue queueY;
    CharArrayList res;

    public void solve(int testNumber, QuickScanner in, QuickWriter out) {
      n = in.nextInt();
      m = in.nextInt();
      nm = n * m;
      length = in.nextInt();
      board = new char[n][m];
      dist = new int[n][m];
      queueX = new IntArrayQueue(nm);
      queueY = new IntArrayQueue(nm);
      int sX = -1, sY = -1;
      for (int i = 0; i < n; ++i) {
        Arrays.fill(dist[i], INF);
        in.next(board[i]);
        for (int j = 0; j < m; ++j)
          if (board[i][j] == 'X') {
            queueX.add(i);
            queueY.add(j);
            sX = i;
            sY = j;
            dist[i][j] = 0;
            break;
          }
      }
      res = new CharArrayList(length);
      bfs();
      calc(sX, sY);
      if (res.size != length) {
        out.println("IMPOSSIBLE");
      } else {
        out.println(res);
      }
    }

    void bfs() {
      while (!queueX.isEmpty()) {
        int x = queueX.poll(), y = queueY.poll(), value = dist[x][y];
        for (int dir = 0; dir < 4; ++dir) {
          int newX = x + DX[dir], newY = y + DY[dir];
          if (isValid(newX, newY) && dist[newX][newY] == INF) {
            queueX.add(newX);
            queueY.add(newY);
            dist[newX][newY] = value + 1;
          }
        }
      }
    }

    boolean isValid(int x, int y) {
      return 0 <= x && x < n && 0 <= y && y < m && board[x][y] != '*';
    }

    void calc(int x, int y) {
      for (int remLength = length - 1; remLength >= 0; --remLength) {
        for (int dir = 0; dir < 4; ++dir) {
          int newX = x + DX[dir], newY = y + DY[dir];
          if (isValid(newX, newY) && dist[newX][newY] <= remLength) {
            x = newX;
            y = newY;
            res.add(D[dir]);
            break;
          }
        }
      }
    }

  }

  static interface CharCollection {
  }

  static class CharArrayList implements CharCollection, Iterable<Character> {
    private static final char[] EMPTY = {};
    public char[] values;
    public int size;

    public CharArrayList() {
      values = EMPTY;
      clear();
    }

    public CharArrayList(int capacity) {
      values = new char[IntUtils.nextPow2(capacity)];
      clear();
    }

    public CharArrayList(Collection<Character> collection) {
      this(collection.size());
      addAll(collection);
    }


    public void clear() {
      size = 0;
    }


    public void add(char value) {
      ensureCapacity(size + 1);
      addInternal(value);
    }


    public void addAll(Collection<Character> values) {
      ensureCapacity(size + values.size());
      for (char value : values) {
        addInternal(value);
      }
    }

    public char get(int idx) {
      if (idx >= size) throw new ArrayIndexOutOfBoundsException();
      return values[idx];
    }

    public void ensureCapacity(int capacity) {
      if (capacity <= values.length) return;
      char[] newValues = new char[IntUtils.nextPow2(capacity)];
      for (int i = 0; i < size; ++i) {
        newValues[i] = values[i];
      }
      values = newValues;
    }


    public String toString() {
      return CharArrayUtils.toString(values, 0, size);
    }


    public Iterator<Character> iterator() {
      return new Iterator<Character>() {
        private int i = 0;


        public boolean hasNext() {
          return i < size;
        }


        public Character next() {
          return values[i++];
        }
      };
    }

    private void addInternal(char value) {
      values[size++] = value;
    }

  }

  static class CharArrayUtils {
    public static String toString(char[] values, int fromIdx, int toIdx) {
      StringBuilder sb = new StringBuilder("[");
      for (int i = fromIdx; i < toIdx; ++i) {
        if (i != fromIdx) sb.append(", ");
        sb.append(values[i]);
      }
      return sb.append("]").toString();
    }

  }

  static class QuickScanner {
    private static final int BUFFER_SIZE = 1024;
    private InputStream stream;
    private byte[] buffer;
    private int currentPosition;
    private int numberOfChars;

    public QuickScanner(InputStream stream) {
      this.stream = stream;
      this.buffer = new byte[BUFFER_SIZE];
      this.currentPosition = 0;
      this.numberOfChars = 0;
    }

    public int next(char[] s) {
      return next(s, 0);
    }

    public int next(char[] s, int startIdx) {
      int b = nextNonSpaceChar();
      int res = 0;
      do {
        s[startIdx++] = (char) b;
        b = nextChar();
        ++res;
      } while (!isSpaceChar(b));
      return res;
    }

    public int nextInt() {
      int c = nextNonSpaceChar();
      boolean positive = true;
      if (c == '-') {
        positive = false;
        c = nextChar();
      }
      int res = 0;
      do {
        if (c < '0' || '9' < c) throw new RuntimeException();
        res = res * 10 + c - '0';
        c = nextChar();
      } while (!isSpaceChar(c));
      return positive ? res : -res;
    }

    public int nextNonSpaceChar() {
      int res = nextChar();
      for (; isSpaceChar(res) || res < 0; res = nextChar()) ;
      return res;
    }

    public int nextChar() {
      if (numberOfChars == -1) {
        throw new RuntimeException();
      }
      if (currentPosition >= numberOfChars) {
        currentPosition = 0;
        try {
          numberOfChars = stream.read(buffer);
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
        if (numberOfChars <= 0) {
          return -1;
        }
      }
      return buffer[currentPosition++];
    }

    public boolean isSpaceChar(int c) {
      return c == ' ' || c == '\t' || isEndOfLineChar(c);
    }

    public boolean isEndOfLineChar(int c) {
      return c == '\n' || c == '\r' || c < 0;
    }

  }

  static class QuickWriter {
    private final PrintWriter writer;

    public QuickWriter(OutputStream outputStream) {
      this.writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public QuickWriter(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 println(Object... objects) {
      print(objects);
      writer.print('\n');
    }

    public void println(CharArrayList lst) {
      for (int i = 0; i < lst.size; ++i) {
        writer.print(lst.get(i));
      }
      writer.print('\n');
    }

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

  }

  static class IntUtils {
    public static boolean isPow2(int n) {
      return n > 0 && (n & (n - 1)) == 0;
    }

    public static int nextPow2(int n) {
      if (n < 1) return 1;
      return isPow2(n) ? n : Integer.highestOneBit(n) << 1;
    }

  }

  static interface IntCollection {
    int size();

    default boolean isEmpty() {
      return size() == 0;
    }

  }

  static class IntArrayQueue implements IntCollection {
    private static int[] EMPTY = {};
    protected int[] values;
    protected int open;
    protected int close;

    public IntArrayQueue() {
      values = EMPTY;
      clear();
    }

    public IntArrayQueue(int capacity) {
      values = new int[Integer.highestOneBit(capacity) << 1];
      clear();
    }


    public void clear() {
      open = close = 0;
    }


    public int size() {
      return (close - open) & (values.length - 1);
    }


    public void add(int value) {
      ensureCapacity(size() + 1);
      values[close++] = value;
      close &= values.length - 1;
    }

    public int poll() {
      if (open == close) throw new ArrayIndexOutOfBoundsException();
      int res = values[open];
      open = (open + 1) & (values.length - 1);
      return res;
    }


    public String toString() {
      StringBuilder sb = new StringBuilder("[");
      for (int i = open; i != close; i = (i + 1) & (values.length - 1)) {
        if (i != open) sb.append(',').append(' ');
        sb.append(values[i]);
      }
      return sb.append(']').toString();
    }

    protected void ensureCapacity(int capacity) {
      if (capacity < values.length) return;
      int[] newValues = new int[Integer.highestOneBit(capacity) << 1];
      for (int i = 0, j = open; j != close; ++i, j = (j + 1) & (values.length - 1)) {
        newValues[i] = values[j];
      }
      close = size();
      open = 0;
      values = newValues;
    }

  }
}

