private void generateElementsRankHints(PrintStream out) {
        Multimap<String, Element> rankMap = new Multimap<String, Element>();
        for (Element element : repository.elements()) {
            String rank = element.getStyle("rank");
            if(rank!=null) {
                rankMap.add(rank, element);
            }
        }

        for (Map.Entry<String, List<Element>> entry : rankMap.entrySet()) {
            out.print("{ rank = same");
            for(Element<?> element : entry.getValue()) {
                out.print("; N" + element.getId().asInt());
            }
            out.println("}");
        }
    }