procedure reverse(s)
   static labels, trans, max
   initial {
      labels := "abcdefghijklmnopqrstuvwxyz"
      trans := "zyxwvutsrqponmlkjihgfedcba"
      max := *labels
      }
   if *s <= max then
      return map(right(trans,*s),left(labels,*s),s)
   else return reverse(right(s,*s - max)) ||
      map(trans,labels,left(s,max))
end
