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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.InputMismatchException;
import java.util.Random;
import java.util.TreeSet;
import java.util.ArrayList;
import java.util.Map;
import java.io.OutputStreamWriter;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.util.Set;
import java.io.IOException;
import java.util.TreeMap;
import java.util.Map.Entry;
import java.io.Writer;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Скромная Няша Стесняша Блять; Зверь нахуй
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            TreeMap<String, TreeSet<String>> set = new TreeMap<>();
            int n = in.readInt();
            for (int iter = 0; iter < n; iter++) {
                String s = in.readString();
                int index = s.indexOf('/', 7);
                if (index == -1) {
                    index = s.length();
                    s += "/sdasfaqegvrehy45yherre4yhgearv";
                }
                String A = s.substring(0, index);
                String B = s.substring(index);
                if (!set.containsKey(A)) {
                    set.put(A, new TreeSet<>());
                }
                set.get(A).add(B);
            }

//        HashMap<HashSet<String>, ArrayList<String>> ans = new HashMap<>();
//        for (Map.Entry<String, HashSet<String>> entry : set.entrySet()) {
//            if (!ans.containsKey(entry.getValue())) {
//                ans.put(entry.getValue(), new ArrayList<>());
//            }
//            ans.get(entry.getValue()).add(entry.getKey());
//        }
//
//        Iterator<Map.Entry<HashSet<String>, ArrayList<String>>> iterator = ans.entrySet().iterator();
//        while (iterator.hasNext()) {
//            if (iterator.next().getValue().size() == 1) {
//                iterator.remove();
//            }
//        }
//
//        out.printLine(ans.size());
//        for (ArrayList<String> strings : ans.values()) {
//            for (String string : strings) {
//                out.print(" " + string);
//            }
//            out.printLine();
//        }


            TreeMap<Long, TreeSet<String>> ans = new TreeMap<>();
            for (Map.Entry<String, TreeSet<String>> entry : set.entrySet()) {
                StringBuilder sb = new StringBuilder();
                ArrayList<String> strings = new ArrayList<>(entry.getValue());
                Collections.sort(strings);
                for (String s : strings) {
                    sb.append(s + "@#$%^&*()(*&$%^&*(");
                }
                long key = new SimpleStringHash(sb).hash(0);
//            long key = 0;
//            for (char c : sb.toString().toCharArray()) {
//                key = (key * 2011 + c) % 123456789821L;
//            }
                if (!ans.containsKey(key)) {
                    ans.put(key, new TreeSet<>());
                }
                ans.get(key).add(entry.getKey());
            }

            Iterator<Map.Entry<Long, TreeSet<String>>> iterator = ans.entrySet().iterator();
            while (iterator.hasNext()) {
                if (iterator.next().getValue().size() == 1) {
                    iterator.remove();
                }
            }

            out.printLine(ans.size());
            for (TreeSet<String> strings : ans.values()) {
                boolean f = true;
                for (String string : strings) {
                    if (!f) {
                        out.print(" ");
                    }
                    out.print(string);
                    f = false;
                }
                out.printLine();
            }
        }

    }

    static abstract class AbstractStringHash implements StringHash {
        public static final long MULTIPLIER;
        protected static final long FIRST_REVERSE_MULTIPLIER;
        protected static final long SECOND_REVERSE_MULTIPLIER;
        public static final long FIRST_MOD;
        public static final long SECOND_MOD;

        static {
            Random random = new Random(System.currentTimeMillis());
            FIRST_MOD = IntegerUtils.nextPrime((long) (1e9 + random.nextInt((int) 1e9)));
            SECOND_MOD = IntegerUtils.nextPrime((long) (1e9 + random.nextInt((int) 1e9)));
            MULTIPLIER = random.nextInt((int) 1e9 - 257) + 257;
            FIRST_REVERSE_MULTIPLIER = IntegerUtils.reverse(MULTIPLIER, FIRST_MOD);
            SECOND_REVERSE_MULTIPLIER = IntegerUtils.reverse(MULTIPLIER, SECOND_MOD);
        }

        public long hash(int from) {
            return hash(from, length());
        }

    }

    static class IntegerUtils {
        public static long power(long base, long exponent, long mod) {
            if (base >= mod) {
                base %= mod;
            }
            if (exponent == 0) {
                return 1 % mod;
            }
            long result = power(base, exponent >> 1, mod);
            result = result * result % mod;
            if ((exponent & 1) != 0) {
                result = result * base % mod;
            }
            return result;
        }

        public static long reverse(long number, long module) {
            return power(number, module - 2, module);
        }

        public static boolean isPrime(long number) {
            if (number < 2) {
                return false;
            }
            for (long i = 2; i * i <= number; i++) {
                if (number % i == 0) {
                    return false;
                }
            }
            return true;
        }

        public static long nextPrime(long from) {
            if (from <= 2) {
                return 2;
            }
            from += 1 - (from & 1);
            while (!isPrime(from)) {
                from += 2;
            }
            return from;
        }

    }

    static interface StringHash {
        long hash(int from, int to);

        int length();

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void printLine() {
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void printLine(int i) {
            writer.println(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class SimpleStringHash extends AbstractStringHash {
        private static long[] firstReversePower = new long[0];
        private static long[] secondReversePower = new long[0];
        private final long[] firstHash;
        private final long[] secondHash;

        public SimpleStringHash(CharSequence string) {
            int length = string.length();
            ensureCapacity(length);
            firstHash = new long[length + 1];
            secondHash = new long[length + 1];
            long firstPower = 1;
            long secondPower = 1;
            for (int i = 0; i < length; i++) {
                firstHash[i + 1] = (firstHash[i] + string.charAt(i) * firstPower) % AbstractStringHash.FIRST_MOD;
                secondHash[i + 1] = (secondHash[i] + string.charAt(i) * secondPower) % AbstractStringHash.SECOND_MOD;
                firstPower *= AbstractStringHash.MULTIPLIER;
                firstPower %= AbstractStringHash.FIRST_MOD;
                secondPower *= AbstractStringHash.MULTIPLIER;
                secondPower %= AbstractStringHash.SECOND_MOD;
            }
        }

        private void ensureCapacity(int length) {
            if (firstReversePower.length >= length) {
                return;
            }
            length = Math.max(length + 1, firstReversePower.length << 1);
            long[] oldFirst = firstReversePower;
            long[] oldSecond = secondReversePower;
            firstReversePower = new long[length];
            secondReversePower = new long[length];
            System.arraycopy(oldFirst, 0, firstReversePower, 0, oldFirst.length);
            System.arraycopy(oldSecond, 0, secondReversePower, 0, oldSecond.length);
            firstReversePower[0] = secondReversePower[0] = 1;
            for (int i = Math.max(oldFirst.length, 1); i < length; i++) {
                firstReversePower[i] = firstReversePower[i - 1] * AbstractStringHash.FIRST_REVERSE_MULTIPLIER %
                        AbstractStringHash.FIRST_MOD;
                secondReversePower[i] = secondReversePower[i - 1] * AbstractStringHash.SECOND_REVERSE_MULTIPLIER %
                        AbstractStringHash.SECOND_MOD;
            }
        }

        public long hash(int from, int to) {
            return (((firstHash[to] - firstHash[from] + AbstractStringHash.FIRST_MOD) * firstReversePower[from] %
                    AbstractStringHash.FIRST_MOD) << 32) +
                    ((secondHash[to] - secondHash[from] + AbstractStringHash.SECOND_MOD) * secondReversePower[from] %
                            AbstractStringHash.SECOND_MOD);
        }

        public int length() {
            return firstHash.length - 1;
        }

    }
}