private static Vertex getNext(List<Vertex> vertices, Vertex already)
	{
		List<Vertex> possi = new ArrayList<Vertex>(vertices.size());
		for (int i = 0; i < vertices.size(); i++) {
			if ((vertices.get(i).getPathsCount() == 0 || vertices.get(i).getPathsCount()%2 != 0) && already.getId() != vertices.get(i).getId() && !already.getPaths().contains(new Path(already.getId(), vertices.get(i).getId())))
				 possi.add(vertices.get(i));
		}
		
		
		if(possi.size() != 0)
		{
			return possi.get(new java.util.Random().nextInt(possi.size()));
		}
		for (int i = 0; i < vertices.size(); i++) {
			
			
            if (already.getId() != vertices.get(i).getId() && !already.getPaths().contains(new Path(already.getId(), vertices.get(i).getId())))
                    return vertices.get(i);
		}
		
		return null;
	}