public class Exercise3
{
	public static void main(String[] args)
	{

	}
}


class TestObject implements Cloneable
{
	public boolean active = false;
	public Object clone()
	{
		return super.clone();
	}
}

class MainObject implements Cloneable
{
	public String name;
	public TestObject myObject;
	public TestObject myObjects[];
	public int id;

	public Object clone()
	{
		try{
			MainObject copy = (MainObject)super.clone();
			if (myObject != null)
			{
				copy.myObject = (TestObject)myObject.clone();
			}
			if (myObjects != null)
			{
				for (int i=0; i<myObjects.length; i++)
				{
					copy.myObjects[i] = (TestObject)myObjects[i].clone();
				}
			}

		}
		catch(CloneNotSupportedException e)
		{

		}

	}
}
