/*
 * File: Passcodes.java
 * --------------------
 * This program prints all 3-character candidate passcodes
 * where each character can be between a and e. That is:
 * 
 * aaa, aab, aac, ..., eec, eed, eee
 */
import acm.program.ConsoleProgram;

public class Passcodes extends ConsoleProgram {
	public void run() {
		setFont("Courier-34");
		
		for (char firstCh = 'a'; firstCh <= 'e'; firstCh++) {
			for (char secondCh = 'a'; secondCh <= 'e'; secondCh++) {
				for (char thirdCh = 'a'; thirdCh <= 'e'; thirdCh++) {
					// concatenate the 3 characters to make a candidate code
					String code = "" + firstCh + secondCh + thirdCh;
					println(code);
				}
			}
		}
		
	}
}
