James needs to fill in three blanks with letters. Find the number of ways he can fill them in if:
a. the letters can be repeated
b. the letters cannot be repeated