^<.*>$|^<<.*>>$|^<<<.*>>>$
^(<(<(<(<(<(<<>>)*>)*>)*>)*>)*>)*$
^(((?<P><)|(?<-P>>))*(?(P)(?!)))$
[<>]{28}