https://www.acmicpc.net/problem/9086
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
while( (str= br.readLine()) !=null ){
int l = str.length();
char[] arr = str.toCharArray();
if( !Character.isDigit(arr[0]) ){
System.out.println(String.valueOf(arr[0]) + String.valueOf(arr[l-1]));
}
}
}
}