Solve homework3-problem2: Generate 3-Letter Words