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
/*
Author: Yiu Yu Ho
Creation: 2011-05-14
Last Updated: 2011-05-14
*/

import java.io.*;
import java.util.*;

public class Track
{
	public Scanner in = new Scanner(System.in);
	public PrintStream out = System.out;

	private class State implements Comparable<State>
	{
		public int x, y;
		public String path;
		public int set;
		
		public State(int xIn, int yIn, String pIn, int sIn)
		{
			x = xIn; y = yIn;
			path = pIn;
			set = sIn;
		}
		
		public int compareTo(State u)
		{
			int c = path.length() - u.path.length();
			if(c != 0) return c;
			
			c = path.compareTo(u.path);
			if(c != 0) return c;
			
			if(x != u.x) return x - u.x;
			if(y != u.y) return y - u.y;
			return set - u.set;
		}
	}
	
	//Down, Up, Right, Left
	public int[] dx = { 1,-1, 0, 0};
	public int[] dy = { 0, 0, 1,-1};	
	
	public int rn, cn, maxK;
	public char[][] A;
	
	public TreeSet<Long> seen;
	public int[][] mem;
	
	public void main()
	{
		rn = in.nextInt();
		cn = in.nextInt();
		maxK = in.nextInt();
		
		A = new char[rn][];
		for(int i = 0; i < rn; ++i) A[i] = in.next().toCharArray();

		mem = new int[rn][cn];
		
		TreeSet<State> Q = new TreeSet<State>();
		seen = new TreeSet<Long>();
		
search:		
		for(int i = 0; i < rn; ++i)
		for(int j = 0; j < cn; ++j) if(A[i][j] == 'S')
		{
			Q.add(new State(i, j, "", 0));
			break search;
		}
		
		while(!Q.isEmpty())
		{
			State now = Q.first();
			Q.remove(now);
			
			int xx, yy;
			for(int dir = 0; dir < dx.length; ++dir)
			{
				xx = now.x + dx[dir];
				yy = now.y + dy[dir];
				
				if(!valid(xx, yy)) continue;
				if(A[xx][yy] == 'S') continue;
				
				if(A[xx][yy] == 'T')
				{
					out.println(now.path);
					return;
				}
								
				int set = on(A[xx][yy] - 'a', now.set);				
				if(size(set) > maxK) continue;
								
				String path = now.path + A[xx][yy];
				long key = encode(xx, yy, set);
				
				if(!seen.contains(key))
				{
					seen.add(key);
					
					if(mem[xx][yy] > 0 && subset(mem[xx][yy], set)) continue;
					mem[xx][yy] = set;
					
					Q.add(new State(xx, yy, path, set));
				}
			}
		}
		
		out.println(-1);
	}//end public void main()

	public long encode(int x, int y, int set)
	{
		return (((set << 6) + x) << 6) + y;
	}
	
	public boolean valid(int x, int y) { return 0 <= x && x < rn && 0 <= y && y < cn; }	
	
	//Turn on bit x
	public int on(int x, int set) { return (set | (1 << x)); }
	
	//returns true if sub is a subset of set
	public boolean subset(int sub, int set) { return (sub & set) == sub; }
	
	//size of a set (number of 1s in set)
	public int size(int set)
	{
		int cnt = 0;
		while(set > 0) { ++cnt; set = set & (set-1); }
		return cnt;
	}	
	
	public static void main(String[] args)
	{
		(new Track()).main();
	}
}