# M (MUMPS) - 72 R n F i=0:1:n W !,i S r=$TR($RE(i),69,96) I '$TR(i,0689),i'=r,r=+r W "." Most built-in commands and functions in M have abbreviated versions. I've used the full names below. `READ n` - Read a string from the keyboard and store it in `n` `FOR i=0:1:n` - Loop from zero to `n`, incrementing `i` by 1 each time `WRITE !,i` - Print a newline followed by the value of `i` `SET r=$TRANSLATE($REVERSE(i),69,96))` - Reverse `i`, replace nines with sixes and sixes with nines, and store that in `r` `IF` - Exactly what it sounds like (multiple comma-separated arguments are ANDed together) `'$TRANSLATE(i,0689)` - Remove all zeros, sixes, eights, and nines from `i`, and see if there's anything left (`'` is the logical negation operator) `i'=r` - Check that `i` isn't the same as it's flipped version `r` `r=+r` - Check that `r` doesn't have a leading zero. The unary `+` operator converts a string to a number, which strips leading zeroes if there are any. `WRITE "."` - Print a dot.