private int maxLength()
	{
		HashMap <Integer,Integer> lengths = new HashMap<Integer,Integer>();
		SimpleQueue<Node> queue = new SimpleQueue<Node>();
		HashSet<Node> printed = new HashSet<Node>();
		queue.add( start );
		while ( !queue.isEmpty() )
		{
			Node node = queue.poll();
			ListIterator<Arc> iter = node.outgoingArcs( this );
			while ( iter.hasNext() )
			{
				Arc a = iter.next();
				char[] data = a.getData();
				// calculate total length
				totalLen += data.length;
				BitSet bs = a.versions;
				for ( int i=bs.nextSetBit(0);i>=0;i=bs.nextSetBit(i+1) )
				{
					if ( lengths.containsKey(i) )
					{
						Integer value = lengths.get( i );
						lengths.put( i, value.intValue()+data.length );
					}
					else
						lengths.put( i, data.length );
				}
				a.to.printArc( a );
				printed.add( a.to );
				if ( a.to != end && a.to.allPrintedIncoming(constraint) )
				{
					queue.add( a.to );
					a.to.reset();
				}
			}
		}
		// clear printed
		Iterator<Node> iter2 = printed.iterator();
		while ( iter2.hasNext() )
		{
			Node n = iter2.next();
			n.reset();
		}
		/// Find the maximum length version
		Integer max = new Integer( 0 );
		Set<Integer> keys = lengths.keySet();
		Iterator<Integer> iter = keys.iterator();
		while ( iter.hasNext() )
		{
			Integer key = iter.next();
			Integer value = lengths.get( key );
			if ( value.intValue() > max.intValue() )
				max = value;
		}
		return max.intValue();
	}