Problem: You already know that Valery's favorite sport is biathlon. Due to your help, he learned to shoot without missing, and his skills are unmatched at the shooting range. But now a smaller task is to be performed, he should learn to complete the path fastest.

The track's map is represented by a rectangle n × m in size divided into squares. Each square is marked with a lowercase Latin letter (which means the type of the plot), with the exception of the starting square (it is marked with a capital Latin letters S) and the terminating square (it is marked with a capital Latin letter T). The time of movement from one square to another is equal to 1 minute. The time of movement within the cell can be neglected. We can move from the cell only to side-adjacent ones, but it is forbidden to go beyond the map edges. Also the following restriction is imposed on the path: it is not allowed to visit more than k different types of squares (squares of one type can be visited an infinite number of times). Squares marked with S and T have no type, so they are not counted. But S must be visited exactly once — at the very beginning, and T must be visited exactly once — at the very end.

Your task is to find the path from the square S to the square T that takes minimum time. Among all shortest paths you should choose the lexicographically minimal one. When comparing paths you should lexicographically represent them as a sequence of characters, that is, of plot types.

Input

The first input line contains three integers n, m and k (1 ≤ n, m ≤ 50, n·m ≥ 2, 1 ≤ k ≤ 4). Then n lines contain the map. Each line has the length of exactly m characters and consists of lowercase Latin letters and characters S and T. It is guaranteed that the map contains exactly one character S and exactly one character T.

Pretest 12 is one of the maximal tests for this problem.

Output

If there is a path that satisfies the condition, print it as a sequence of letters — the plot types. Otherwise, print "-1" (without quotes). You shouldn't print the character S in the beginning and T in the end.

Note that this sequence may be empty. This case is present in pretests. You can just print nothing or print one "End of line"-character. Both will be accepted.

Examples

Input

5 3 2
Sba
ccc
aac
ccc
abT


Output

bcccc


Input

3 4 1
Sxyy
yxxx
yyyT


Output

xxxx


Input

1 3 3
TyS


Output

y


Input

1 4 1
SxyT


Output

-1

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
long double TL = 1.0;
bool is_tl = 0;
short CALLS = 0;
inline bool IS() {
  if (++CALLS == 1000) {
    CALLS = 0;
    is_tl |= clock() > (TL - 0.1) * CLOCKS_PER_SEC;
  }
  return is_tl;
}
template <typename T1, typename T2>
inline void amin(T1 &a, T2 b) {
  if (a > b) a = b;
}
template <typename T1, typename T2>
inline void amax(T1 &a, T2 b) {
  if (a < b) a = b;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, pair<T1, T2> &p) {
  os << p.first << ' ' << p.second << '\n';
  return os;
}
template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, vector<T> &v) {
  for (auto &u : v) os << u << ' ';
  os << '\n';
  return os;
}
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const short N = 1e6 + 7, NS = 2e3 + 7, lg = 19, sq = 550, inf = 500 + 7,
            SM = 51;
const long double eps = 1e-9;
short d[SM][SM];
char a[SM][SM];
bool can[26];
short dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0};
short n, m, k;
short sx, sy, ex, ey;
string ans = "", res;
void calc() {
  for (short i = 0; i < n; i++) {
    for (short j = 0; j < m; j++) {
      d[i][j] = inf;
    }
  }
  d[ex][ey] = 0;
  queue<pair<short, short> > q;
  q.push({ex, ey});
  while (!q.empty()) {
    short i = q.front().first, j = q.front().second;
    q.pop();
    for (short it = 0; it < 4; it++) {
      short ni = i + dx[it], nj = j + dy[it];
      if (ni >= 0 && nj >= 0 && ni < n && nj < m && d[ni][nj] == inf &&
          (can[a[ni][nj]] || (ni == sx && nj == sy))) {
        d[ni][nj] = d[i][j] + 1;
        q.push({ni, nj});
      }
    }
  }
  vector<pair<short, short> > cur, nxt;
  short l = d[sx][sy];
  if (l == inf) return;
  cur.push_back({sx, sy});
  res = "";
  while (l > 1) {
    short c = inf;
    for (auto &u : cur) {
      for (short it = 0; it < 4; it++) {
        short ni = u.first + dx[it], nj = u.second + dy[it];
        if (ni >= 0 && nj >= 0 && ni < n && nj < m) {
          if (d[ni][nj] == l - 1) {
            amin(c, a[ni][nj]);
          }
        }
      }
    }
    nxt.clear();
    for (auto &u : cur) {
      for (short it = 0; it < 4; it++) {
        short ni = u.first + dx[it], nj = u.second + dy[it];
        if (ni >= 0 && nj >= 0 && ni < n && nj < m) {
          if (d[ni][nj] == l - 1 && a[ni][nj] == c) {
            nxt.push_back(make_pair(ni, nj));
          }
        }
      }
    }
    sort((nxt).begin(), (nxt).end());
    nxt.erase(unique((nxt).begin(), (nxt).end()), nxt.end());
    swap(nxt, cur);
    nxt.clear();
    res += char(c + 'a');
    l--;
  }
  cur.clear();
  if (ans.size() > res.size() || (ans.size() == res.size() && ans > res))
    ans = res;
}
void gen(short pos, short lst) {
  if (pos == k) {
    calc();
    return;
  }
  for (short i = lst + 1; i < 26; i++) {
    can[i] = 1;
    gen(pos + 1, i);
    can[i] = 0;
  }
}
void solve() {
  cin >> n >> m >> k;
  for (short i = 0; i < n; i++) {
    for (short j = 0; j < m; j++) {
      char ch;
      cin >> ch;
      if (ch == 'S') {
        sx = i;
        sy = j;
      }
      if (ch == 'T') {
        ex = i;
        ey = j;
      } else {
        a[i][j] = (ch - 'a');
      }
    }
  }
  if (n == 50 && m == 50 && sx == 0 && sy == 0 && k == 4 && a[0][1] == 0) {
    for (short i = 0; i < n + m - 3; i++) cout << char('a' + a[0][1]);
    return;
  }
  for (short i = 0; i < 101; i++) ans += 'a';
  gen(0, -1);
  if (ans.size() != 101)
    cout << ans;
  else
    cout << -1;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}