import java.util.LinkedList;
import java.util.Queue;

public class Buckets {
		/**
		 * Maximum capacity of bucket 1
		 */
		public static int MAX1 = 3;
		/**
		 * Maximum capacity of bucket 2
		 */
		public static int MAX2 = 5; 
		/**
		 * Goal total amount to measure in buckets 1 and 2 
		 */
		public static int GOAL_AMOUNT = 4; 	
		/**
		 * Current amount in bucket1
		 */
		private int bucket1;
		/**
		 * Current amount in bucket2
		 */
		private int bucket2; 
		/**
		 * Previous state (null if the initial state 0,0)
		 */
		private Buckets parent; 
		
		/**
		 * Create a new bucket puzzle state with given bucket amounts and parent (previous) state
		 * @param bucket1 amount in bucket 1
		 * @param bucket2 amount in bucket 2
		 * @param parent previous state
		 */
		public Buckets(int bucket1, int bucket2, Buckets parent) {
			// Copy values into private fields of the same name
			
			// TODO
		}
		
		public Buckets() {
			// Create an initial 0,0 state with no (null) parent.
		}
		
		public String toString() {
			// Return a String that is a list of all states leading to and including this state
			// with one state per line and each state represented as a comma-separated pair of 
			// bucket amounts. This can be accomplished recursively.
			
			// TODO			
		}
		
		public static void main(String[] args) {
			// Given a 3-unit and a 5-unit bucket, how can one measure exactly 4 units of liquid?
			// Pseudocode:
			// - Create a queue and enqueue a 0,0 initial Buckets state.
			// - While there is another state in the queue:
			// - - Get the state at the front of the queue.
			// - - If the sum of the amounts in the buckets is the goal amount:
			// - - - Print the state and break out of the loop.
			// - - For each _legal_ move, create and add the resulting changed state to the queue.
			//     (A move is legal if it results in a change of state.) 
			
			// List of moves to check for legality:
			// fill bucket 1
			// fill bucket 2
			// empty bucket 1
			// empty bucket 2
			// pour bucket 1 to 2
			// pour bucket 2 to 1

			// TODO
		}
	
}
