import java.util.Scanner;
public class HelloWorld {
public static void main(String []args){
Scanner sc = new Scanner(System.in);
String str = sc.next();
System.out.println(str);
System.out.println(str.charAt(2));
System.out.println(str.charAt(str.length() - 2));
System.out.println(str.substring(0, 5));
System.out.println(str.substring(0, str.length() - 2));
System.out.println(str.substring(3, str.length()));
System.out.println(str.length());
}
}