#include <bits/stdc++.h>
using namespace std;
priority_queue<pair<int, int>, vector<pair<int, int> >,
               greater<pair<int, int> > >
    pq;
long long int mini(long long int a, long long int b) { return a < b ? a : b; }
long long int maxi(long long int a, long long int b) { return a > b ? a : b; }
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int binpow(long long int n, long long int x) {
  long long int ans = 1;
  while (x) {
    if (x & 1) ans *= n;
    n *= n;
    x >>= 1;
  }
  return ans;
}
const int maxnodes = 1e3 + 10;
int A[maxnodes + 1][maxnodes + 1];
int vis[maxnodes + 1][maxnodes + 1];
int dist[maxnodes + 1][maxnodes + 1];
int n, m, k;
bool valid(int x, int y) {
  if (x >= n || x < 0) {
    return false;
  }
  if (y >= m || y < 0) {
    return false;
  }
  if (A[x][y] == 1) {
    return false;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  string s;
  int x, y;
  for (int i = 0; i < n; ++i) {
    cin >> s;
    for (int j = 0; j < m; j++) {
      if (s[j] == '.')
        A[i][j] = 0;
      else if (s[j] == '*')
        A[i][j] = 1;
      else {
        A[i][j] = 2;
        x = i;
        y = j;
      }
      dist[i][j] = maxnodes;
    }
  }
  if (k % 2) {
    cout << "IMPOSSIBLE\n";
    return 0;
  }
  int movex[] = {1, 0, 0, -1};
  int movey[] = {0, -1, 1, 0};
  char movechar[] = {'D', 'L', 'R', 'U'};
  int ex = x;
  int ey = y;
  int xnew, ynew;
  queue<pair<int, int> > q;
  q.push(make_pair(x, y));
  dist[x][y] = 0;
  vis[x][y] = 1;
  while (!q.empty()) {
    x = q.front().first;
    y = q.front().second;
    q.pop();
    for (int i = 0; i < 4; ++i) {
      xnew = x + movex[i];
      ynew = y + movey[i];
      if (valid(xnew, ynew) && !vis[xnew][ynew]) {
        q.push(make_pair(xnew, ynew));
        dist[xnew][ynew] = dist[x][y] + 1;
        vis[xnew][ynew] = 1;
      } else {
      }
    }
  }
  x = ex;
  y = ey;
  vector<char> ans;
  for (int i = 1; i <= k; ++i) {
    int j = 0;
    for (; j < 4; ++j) {
      xnew = ex + movex[j];
      ynew = ey + movey[j];
      if (valid(xnew, ynew) && dist[xnew][ynew] <= (k - i)) {
        ans.push_back(movechar[j]);
        ex = xnew;
        ey = ynew;
        break;
      } else {
      }
    }
    if (j == 4) {
      cout << "IMPOSSIBLE\n";
      return 0;
    }
  }
  for (auto i : ans) cout << i;
  cout << "\n";
  return 0;
}
