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.*;
import java.util.*;

public class Practice {
	//lexographically best moves...
	public static int dx[]= {1,0,0,-1};
	public static int dy[]= {0,-1,1,0};
	public static int r_x=-1,r_y=-1;
	public static int shortest_path[][];
	public static boolean visited[][];
	public static boolean isValid(int x,int y,int n,int m) {
		return x>=0 && y>=0 && x<n && y<m;
	}
	public static boolean isValidMove(int curr_x,int curr_y,int moves_left_after_this_move) {
		return shortest_path[curr_x][curr_y]<=moves_left_after_this_move;
	}
	public static void main(String[] args) throws FileNotFoundException {
		FastScanner fs = new FastScanner();
		FastOutput fo = new FastOutput(System.out);
		long initial_time = System.currentTimeMillis();
		//int testcases = fs.nextInt();
		//for (int tt = 0; tt < testcases; tt++) {
			//main code
		int n=fs.nextInt(),m=fs.nextInt(),k=fs.nextInt();
		char arr[][]=new char[n][m];
		shortest_path=new int[n][m];
		visited=new boolean[n][m];
		for(int i=0;i<n;i++) {
			String t=fs.next();
			for(int j=0;j<m;j++) {
				arr[i][j]=t.charAt(j);
				if(arr[i][j]=='X') {
					r_x=i;r_y=j;
				}
			}
		}
		if(k%2!=0) {
			fo.println("IMPOSSIBLE");
		}
		else {
			Queue<Pair> q=new ArrayDeque<Pair>();
			q.add(new Pair(r_x, r_y));
			//shortest_path[r_x][r_y]=1;
			visited[r_x][r_y]=true;
			while(!q.isEmpty()) {
				Pair temp=q.poll();
				if(isValid(temp.x_pos+dx[0], temp.y_pos+dy[0], n, m) && !visited[temp.x_pos+dx[0]][temp.y_pos+dy[0]] && arr[temp.x_pos+dx[0]][temp.y_pos+dy[0]]!='*') {
					shortest_path[temp.x_pos+dx[0]][temp.y_pos+dy[0]]=1+shortest_path[temp.x_pos][temp.y_pos];
					q.add(new Pair(temp.x_pos+dx[0], temp.y_pos+dy[0]));
					visited[temp.x_pos+dx[0]][temp.y_pos+dy[0]]=true;
				}
				if(isValid(temp.x_pos+dx[1], temp.y_pos+dy[1], n, m) && !visited[temp.x_pos+dx[1]][temp.y_pos+dy[1]] && arr[temp.x_pos+dx[1]][temp.y_pos+dy[1]]!='*') {
					shortest_path[temp.x_pos+dx[1]][temp.y_pos+dy[1]]=1+shortest_path[temp.x_pos][temp.y_pos];
					q.add(new Pair(temp.x_pos+dx[1], temp.y_pos+dy[1]));
					visited[temp.x_pos+dx[1]][temp.y_pos+dy[1]]=true;
				}
				if(isValid(temp.x_pos+dx[2], temp.y_pos+dy[2], n, m) && !visited[temp.x_pos+dx[2]][temp.y_pos+dy[2]] && arr[temp.x_pos+dx[2]][temp.y_pos+dy[2]]!='*') {
					shortest_path[temp.x_pos+dx[2]][temp.y_pos+dy[2]]=1+shortest_path[temp.x_pos][temp.y_pos];
					q.add(new Pair(temp.x_pos+dx[2], temp.y_pos+dy[2]));
					visited[temp.x_pos+dx[2]][temp.y_pos+dy[2]]=true;
				}
				if(isValid(temp.x_pos+dx[3], temp.y_pos+dy[3], n, m) && !visited[temp.x_pos+dx[3]][temp.y_pos+dy[3]] && arr[temp.x_pos+dx[3]][temp.y_pos+dy[3]]!='*') {
					shortest_path[temp.x_pos+dx[3]][temp.y_pos+dy[3]]=1+shortest_path[temp.x_pos][temp.y_pos];
					q.add(new Pair(temp.x_pos+dx[3], temp.y_pos+dy[3]));
					visited[temp.x_pos+dx[3]][temp.y_pos+dy[3]]=true;
				}
			}
			q.clear();
			StringBuilder final_ans=new StringBuilder();
			int final_ans_len=0;
			q.add(new Pair(r_x, r_y));
			while(!q.isEmpty()) {
				Pair p=q.poll();
				//move to down
				if(isValid(p.x_pos+dx[0], p.y_pos+dy[0], n, m) && arr[p.x_pos+dx[0]][p.y_pos+dy[0]]!='*' && isValidMove(p.x_pos+dx[0], p.y_pos+dy[0], k-final_ans_len-1)) {
					final_ans.append('D');
					q.add(new Pair(p.x_pos+dx[0], p.y_pos+dy[0]));
					final_ans_len++;
				}
				//move to left
				else if(isValid(p.x_pos+dx[1], p.y_pos+dy[1], n, m) && arr[p.x_pos+dx[1]][p.y_pos+dy[1]]!='*' && isValidMove(p.x_pos+dx[1], p.y_pos+dy[1], k-final_ans_len-1)) {
					final_ans.append('L');
					q.add(new Pair(p.x_pos+dx[1], p.y_pos+dy[1]));
					final_ans_len++;
				}
				//move to right
				else if(isValid(p.x_pos+dx[2], p.y_pos+dy[2], n, m) && arr[p.x_pos+dx[2]][p.y_pos+dy[2]]!='*' && isValidMove(p.x_pos+dx[2], p.y_pos+dy[2], k-final_ans_len-1)) {
					final_ans.append('R');
					q.add(new Pair(p.x_pos+dx[2], p.y_pos+dy[2]));
					final_ans_len++;
				}
				//move to up
				else if(isValid(p.x_pos+dx[3], p.y_pos+dy[3], n, m) && arr[p.x_pos+dx[3]][p.y_pos+dy[3]]!='*' && isValidMove(p.x_pos+dx[3], p.y_pos+dy[3], k-final_ans_len-1)) {
					final_ans.append('U');
					q.add(new Pair(p.x_pos+dx[3], p.y_pos+dy[3]));
					final_ans_len++;
				}
			}
			//fo.println(final_ans_len);
			if(final_ans_len!=k) {
				fo.println("IMPOSSIBLE");
			}
			else {
				fo.println(final_ans);
			}
		}
		//}
		fo.time(initial_time);
		fo.close();
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() throws FileNotFoundException {
			if (System.getProperty("ONLINE_JUDGE") == null) {
				//Read from the File...
				File file = new File("src\\input");
				br = new BufferedReader(new FileReader(file));
			} else {
				//Read from the System...
				br = new BufferedReader(new InputStreamReader(System.in));
			}
			st = new StringTokenizer("");
		}

		String next() {
			while (!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

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

		int[] readArray(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

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

	static class FastOutput extends PrintWriter {

		public FastOutput(PrintStream out) {
			super(out);
		}

		void time(long init) {
			if (System.getProperty("ONLINE_JUDGE") == null) {
				this.println(System.currentTimeMillis() - init + "ms");
			}
		}
	}
}
class Pair{
	int x_pos,y_pos,curr_len;
	public Pair(int b,int c) {
		this.x_pos=b;
		this.y_pos=c;
	}
}