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

import static java.lang.Math.*;
import static java.util.Arrays.fill;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.sort;

public class Main {
	public static void main(String[] args) throws IOException {
		try {
			if (new File("input.txt").exists())
				System.setIn(new FileInputStream("input.txt"));
		} catch (SecurityException e) {}

		new Main().run();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");
	
	int MAX = 3000000;
	
	int N;
	int M;
	int K;
	char[][] map;
	
	boolean[] good = new boolean [256];
	
	int[][] used = new int [50][50];
	int tick = 1;
	
	State[] tmpQueue1 = new State [MAX];
	State[] tmpQueue2 = new State [MAX];
	
	State[] curQueue = tmpQueue1;
	State[] nxtQueue = tmpQueue2;
	
	int csz;
	int nsz;
	
	int startR;
	int startC;
	
	int finishR;
	int finishC;
	
	int[] dr = { -1, 0, 1, 0 };
	int[] dc = { 0, 1, 0, -1 };
	
	String ans = null;
	
	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		
		N = nextInt();
		M = nextInt();
		K = nextInt();
		map = new char [N][];
		for (int i = 0; i < N; i++)
			map[i] = nextToken().toCharArray();
		
		for (int r = 0; r < N; r++) {
			for (int c = 0; c < M; c++) {
				if (map[r][c] == 'S') {
					startR = r;
					startC = c;
				}
				
				if (map[r][c] == 'T') {
					finishR = r;
					finishC = c;
				}
			}
		}
		
		rec(0, 'a');
		out.println(ans == null ? "-1" : ans);
		
		out.close();
	}
	
	void rec(int pos, char from) {
		if (pos == K) {
			solve();
		} else {
			if (from > 'z')
				return;
			for (char c = from; c <= 'z'; c++) {
				good[c] = true;
				rec(pos + 1, (char) (c + 1));
				good[c] = false;
			}
		}
	}
	
	void solve() {
		csz = 0;
		nsz = 0;
		tick++;
		
		State state = bfs();
		if (state != null) {
			StringBuffer sb = new StringBuffer();
			for (State cs = state; cs != null; cs = cs.prev)
				if (cs.prev != null)
					sb.append(cs.symb);
			String cur = sb.reverse().toString();
			if (ans == null || ans.length() > cur.length() || ans.length() == cur.length() && ans.compareTo(cur) > 0)
				ans = cur;
		}
	}

	State bfs() {
		State initState = new State(0, startR, startC, null);
		curQueue[csz++] = initState;
		used[startR][startC] = tick;
		
		while (csz > 0) {
			sort(curQueue, 0, csz);
			
			int prevClass = -1;
			char prevSymb = 0;
			int curClass = -1;
			
			for (int i = 0; i < csz; i++) {
				State cur = curQueue[i];
				
				if (cur.eqClass != prevClass || cur.symb != prevSymb) {
					prevClass = cur.eqClass;
					prevSymb = cur.symb;
					curClass++;
				}
				
				for (int d = 0; d < dr.length; d++) {
					int nr = cur.r + dr[d];
					int nc = cur.c + dc[d];
					
					if (nr == finishR && nc == finishC)
						return cur;
					
					if (good(nr, nc)) {
						used[nr][nc] = tick;
						nxtQueue[nsz++] = new State(curClass, nr, nc, cur);
					}
				}
			}
			
			swap();
		}
		
		return null;
	}

	void swap() {
		if (curQueue == tmpQueue1) {
			curQueue = tmpQueue2;
			nxtQueue = tmpQueue1;
		} else {
			curQueue = tmpQueue1;
			nxtQueue = tmpQueue2;
		}
		
		csz = nsz;
		nsz = 0;
	}
	
	boolean good(int r, int c) {
		return 0 <= r && r < N && 0 <= c && c < M && good[map[r][c]] && used[r][c] != tick;
	}

	long code(int r, int c, long mask) {
		return (mask << 12) | (r << 6) | c;
	}

	class State implements Comparable<State> {
		int eqClass;
		int r;
		int c;
		char symb;
		State prev;
		
		State(int eqClass, int r, int c, State prev) {
			this.eqClass = eqClass;
			this.r = r;
			this.c = c;
			this.symb = map[r][c];
			this.prev = prev;
		}

		@Override
		public int compareTo(State s) {
			if (eqClass != s.eqClass) return eqClass < s.eqClass ? -1 : 1;
			if (symb != s.symb) return symb < s.symb ? -1 : 1;
			return 0;
		}
	}
	
	/*************************************************************** 
	 * Input 
	 **************************************************************/
	String nextToken() throws IOException {
		while (!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	
	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}
	
	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}
	
	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
	
	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}
	
	boolean EOF() throws IOException {
		while (!st.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null)
				return true;
			st = new StringTokenizer(s);
		}
		return false;
	}
}
