import java.lang.Integer;
import java.lang.Object;
import java.lang.Float;
import java.lang.String;

public class NumberOrText{}
public class Text extends NumberOrText{};
public class Number extends NumberOrText{};


public record Cons(Integer a, NumberOrText l){}


public class SwitchCaseHeritageDetection {
    public main(o) {
         return switch(o) {
                case Cons(a, Text b) -> "Second Element is a Text";
                case Cons(a, Number b) -> "Second Element is a Number";
                default -> "None of the above cases";
         };
    }
}