Regarding different nucleotides on a DNA strand
These are IUPAC codes for so-called "degenerate" or ambiguous bases, alternatives to the usual A, T, C, and G nucleotides (for DNA). The N code represents any base, while M and K map to A or C, and G or T, respectively.