Problem: There are some websites that are accessible through several different addresses. For example, for a long time Codeforces was accessible with two hostnames codeforces.com and codeforces.ru.

You are given a list of page addresses being queried. For simplicity we consider all addresses to have the form http://<hostname>[/<path>], where:

  * <hostname> — server name (consists of words and maybe some dots separating them), 
  * /<path> — optional part, where <path> consists of words separated by slashes. 



We consider two <hostname> to correspond to one website if for each query to the first <hostname> there will be exactly the same query to the second one and vice versa — for each query to the second <hostname> there will be the same query to the first one. Take a look at the samples for further clarifications.

Your goal is to determine the groups of server names that correspond to one website. Ignore groups consisting of the only server name.

Please note, that according to the above definition queries http://<hostname> and http://<hostname>/ are different.

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 100 000) — the number of page queries. Then follow n lines each containing exactly one address. Each address is of the form http://<hostname>[/<path>], where:

  * <hostname> consists of lowercase English letters and dots, there are no two consecutive dots, <hostname> doesn't start or finish with a dot. The length of <hostname> is positive and doesn't exceed 20. 
  * <path> consists of lowercase English letters, dots and slashes. There are no two consecutive slashes, <path> doesn't start with a slash and its length doesn't exceed 20. 



Addresses are not guaranteed to be distinct.

Output

First print k — the number of groups of server names that correspond to one website. You should count only groups of size greater than one.

Next k lines should contain the description of groups, one group per line. For each group print all server names separated by a single space. You are allowed to print both groups and names inside any group in arbitrary order.

Examples

Input

10
http://abacaba.ru/test
http://abacaba.ru/
http://abacaba.com
http://abacaba.com/test
http://abacaba.de/
http://abacaba.ru/test
http://abacaba.de/test
http://abacaba.com/
http://abacaba.com/t
http://abacaba.com/test


Output

1
http://abacaba.de http://abacaba.ru 


Input

14
http://c
http://ccc.bbbb/aba..b
http://cba.com
http://a.c/aba..b/a
http://abc/
http://a.c/
http://ccc.bbbb
http://ab.ac.bc.aa/
http://a.a.a/
http://ccc.bbbb/
http://cba.com/
http://cba.com/aba..b
http://a.a.a/aba..b/a
http://abc/aba..b/a


Output

2
http://cba.com http://ccc.bbbb 
http://a.a.a http://a.c http://abc 

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;

public class Main {

    private NotMyScanner in;
    private PrintWriter out;
//    private Timer timer = new Timer();

    private String[] split(String cur) {
        String[] res = new String[2];
        int pos = -1;
        for (int i = 7; i < cur.length(); i++) {
            if (cur.charAt(i) == '/') {
                pos = i;
                break;
            }
        }
        if (pos == -1) {
            res[0] = cur;
            res[1] = "";
        } else {
            res[0] = cur.substring(0, pos);
            res[1] = cur.substring(pos);
        }
        return res;
    }

/*
    private void getTest() throws IOException {
        FileWriter writer = new FileWriter("test.txt");
        writer.write("100000\n");
        Random random = new Random();
        for (int i = 0; i < 100000; i++) {
            writer.write("http://");
            writer.write("" + random.nextInt());
            writer.write("/");
            writer.write("" + random.nextInt());
            writer.write("\n");
        }
        writer.close();
    }
*/

    private void solve() throws IOException {
//        timer.start();
        int n = in.nextInt();

        Map<String, Integer> domainToId = new HashMap<>();
        String[] domains = new String[100_000];

        Map<String, Integer> pathToId = new HashMap<>();
        Set<Integer>[] paths = new Set[100_000];

        int domainIds = 0, pathIds = 0;
        while (n-- > 0) {
            String[] cur = split(in.next());

            Integer domainId = domainToId.get(cur[0]);
            if (domainId == null) {
                domainId = domainIds++;
                domainToId.put(cur[0], domainId);
                domains[domainId] = cur[0];
            }

            Integer pathId = pathToId.get(cur[1]);
            if (pathId == null) {
                pathId = pathIds++;
                pathToId.put(cur[1], pathId);
                paths[pathId] = new TreeSet<>();
            }

            paths[pathId].add(domainId);
        }

        int[] group = new int[domainIds];
        int groups = 1;
        for (int i = 0; i < pathIds; i++) {
            Map<Integer, Integer> oldToNewGroup = new HashMap<>();
            for (int domainId : paths[i]) {
                Integer newGroup = oldToNewGroup.get(group[domainId]);
                if (newGroup == null) {
                    newGroup = groups++;
                    oldToNewGroup.put(group[domainId], newGroup);
                }
                group[domainId] = newGroup;
            }
        }

        ArrayList<Integer>[] groupContent = new ArrayList[groups];
        for (int i = 0; i < groups; i++) {
            groupContent[i] = new ArrayList<>();
        }

        for (int i = 0; i < domainIds; i++) {
            groupContent[group[i]].add(i);
        }

        int ans = 0;
        for (ArrayList<Integer> content : groupContent) {
            if (content.size() > 1) {
                ans++;
            }
        }
        out.println(ans);
        for (ArrayList<Integer> content : groupContent) {
            if (content.size() > 1) {
                for (int e : content) {
                    out.print(domains[e] + " ");
                }
                out.println();
            }
        }
//        timer.stop();
    }

    private void run() throws IOException {
//        getTest();
//        in = new NotMyScanner("out.txt");
        in = new NotMyScanner();
        out = new PrintWriter(System.out, true);
        solve();
        out.close();
    }

    public static void main(String[] args) throws IOException {
        new Main().run();
    }
}

class NotMyScanner {

    private final BufferedReader br;
    private StringTokenizer st;
    private String last;

    public NotMyScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    public NotMyScanner(String path) throws IOException {
        br = new BufferedReader(new FileReader(path));
    }

    public NotMyScanner(String path, String decoder) throws IOException {
        br = new BufferedReader(new InputStreamReader(new FileInputStream(path), decoder));
    }

    String next() throws IOException {
        while (st == null || !st.hasMoreElements())
            st = new StringTokenizer(br.readLine());
        last = null;
        return st.nextToken();
    }

    String nextLine() throws IOException {
        st = null;
        return (last == null) ? br.readLine() : last;
    }

    boolean hasNext() {
        if (st != null && st.hasMoreElements())
            return true;

        try {
            while (st == null || !st.hasMoreElements()) {
                last = br.readLine();
                st = new StringTokenizer(last);
            }
        } catch (Exception e) {
            return false;
        }

        return true;
    }

    String[] nextStrings(int n) throws IOException {
        String[] arr = new String[n];
        for (int i = 0; i < n; i++)
            arr[i] = next();
        return arr;
    }

    String[] nextLines(int n) throws IOException {
        String[] arr = new String[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextLine();
        return arr;
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    int[] nextInts(int n) throws IOException {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextInt();
        return arr;
    }

    Integer[] nextIntegers(int n) throws IOException {
        Integer[] arr = new Integer[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextInt();
        return arr;
    }

    int[][] next2Ints(int n, int m) throws IOException {
        int[][] arr = new int[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                arr[i][j] = nextInt();
        return arr;
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    long[] nextLongs(int n) throws IOException {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++)
            arr[i] = nextLong();
        return arr;
    }

    long[][] next2Longs(int n, int m) throws IOException {
        long[][] arr = new long[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                arr[i][j] = nextLong();
        return arr;
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next().replace(',', '.'));
    }

    double[] nextDoubles(int size) throws IOException {
        double[] arr = new double[size];
        for (int i = 0; i < size; i++)
            arr[i] = nextDouble();
        return arr;
    }

    boolean nextBool() throws IOException {
        String s = next();
        if (s.equalsIgnoreCase("true") || s.equals("1"))
            return true;

        if (s.equalsIgnoreCase("false") || s.equals("0"))
            return false;

        throw new IOException("Boolean expected, String found!");
    }
}