func$ nth num .
   last2 = num mod 100
   last = num mod 10
   if last2 >= 11 and last2 <= 13
      return num & "th"
   elif last = 1
      return num & "st"
   elif last = 2
      return num & "nd"
   elif last = 3
      return num & "rd"
   else
      return num & "th"
   .
.
print "0 to 25:"
for i = 0 to 25
   write nth i & " "
.
print ""
print "250 to 265:"
for i = 250 to 265
   write nth i & " "
.
print ""
print "1000 to 1025:"
for i = 1000 to 1025
   write nth i & " "
.
