# Returns true if we can apply Rule 1 to the given string.
# (Rule 1: If the string ends with an I, we can add on a U at the end.)
def can_apply_rule1?(str)
  str.end_with?("I")
end

# Applies Rule 1: We add a U to the end of the given string.
def apply_rule1(str)
  str + "U"
end