import java.util.*;
public class ZiFu {
public static void main(String args[]){
System.out.println("请输入你要截取的字符串:");
Scanner scan=new Scanner(System.in);
String word=scan.next();
System.out.println(word+"的首位字符为"+word.substring(0,1));
System.out.println(word+"的末尾字符为"+word.substring(word.length()-1));
}
}