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.net.*;
import java.math.*;
import java.util.*;
import java.util.stream.*;

@SuppressWarnings("unchecked")
public class P644C {

  class Host implements Comparable<Host> {
    int id;
    Set<Integer> pset = new HashSet();
    List<Integer> paths = null;

    public Host(int id) {
      this.id = id;
    }

    public void add(int path) {
      pset.add(path);
    }

    public void done() {
      paths = new ArrayList(pset.size());
      for (Integer i : pset) {
        paths.add(i);
      }
      pset = null;
      paths.sort(null);
    }

    @Override
    public int compareTo(Host host) {
      int diff = (paths.size() - host.paths.size());
      
      if (diff == 0) {
/*
        int lo = 0, hi = paths.size();

        while (lo < hi) {
          int mid = (hi + lo) >> 1;
          diff = paths.get(mid) - host.paths.get(mid);
        
          if (diff == 0) {
            lo = mid + 1;
          } else {
            hi = mid;
          }
        }
*/
        for (int i = paths.size() - 1; i >= 0; i--) {
          diff = paths.get(i) - host.paths.get(i);
          if (diff != 0) {
            break;
          }
        }
      }

      return diff;
    }

    @Override
    public String toString() {
      return ("[" + id + " : " + ((paths != null) ? paths : pset) + "]");
    }
  }

  int getNum(Map<String, Integer> m, String s) {
    Integer n = m.get(s);
    if (n == null) {
      n = m.size();
      m.put(s, n);
    }
    return n;
  }

  public void run() throws Exception {
    int n = nextInt();

    Map<String, Integer> hn = new HashMap(n);
    Map<String, Integer> pn = new HashMap(n);
    List<Host> hosts = new ArrayList(n);
    List<String> names = new ArrayList(n);

    for (int i = 0; i < n; i++) {
      String url = next();
    
      int pi = url.indexOf('/', 7);
      pi = (pi == -1) ? url.length() : pi;
      String host = url.substring(7, pi);
      String path = url.substring(pi, url.length());
      
      int hnum = getNum(hn, host);
      int pnum = getNum(pn, path);
      Host h = null;
      if (hnum >= hosts.size()) {
        h = new Host(hnum);
        hosts.add(h);
        names.add(host);
      } else {
        h = hosts.get(hnum);
      }
      h.add(pnum);
    }

    hn = pn = null;
    for (Host host : hosts) {
      host.done();
    }
    hosts.sort(null);

    n = hosts.size();
    List<int []> grp = new ArrayList();
    for (int i = 0, j; i < n; i = j) {
      for (j = i + 1; (j < n) && (hosts.get(i).compareTo(hosts.get(j)) == 0); j++);
      
      if ((j - i) > 1) {
        grp.add(new int [] {i, j});
      }
    }

    println(grp.size());
    for (int [] ij : grp) {
      for (int i = ij[0], mi = ij[1]; i < mi; i++) {
        print("http://" + names.get(hosts.get(i).id) + " ");
      }
      println();
    }
  }

  public static void main(String... args) throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedOutputStream(System.out));
    new P644C().run();
    br.close();
    pw.close();
    System.err.println("\n[Time : " + (System.currentTimeMillis() - startTime) + " ms]");
  }

  static long startTime = System.currentTimeMillis();
  static BufferedReader br;
  static PrintWriter pw;
  StringTokenizer stok;

  String nextToken() throws IOException {
    while (stok == null || !stok.hasMoreTokens()) {
      String s = br.readLine();
      if (s == null) { return null; }
      stok = new StringTokenizer(s);
    }
    return stok.nextToken();
  }

  void print(byte b) { print("" + b); }
  void print(int i) { print("" + i); }
  void print(long l) { print("" + l); }
  void print(double d) { print("" + d); }
  void print(char c) { print("" + c); }
  void print(Object o) {
    if (o instanceof int[]) { print(Arrays.toString((int [])o));
    } else if (o instanceof long[]) { print(Arrays.toString((long [])o));
    } else if (o instanceof char[]) { print(Arrays.toString((char [])o));
    } else if (o instanceof byte[]) { print(Arrays.toString((byte [])o));
    } else if (o instanceof short[]) { print(Arrays.toString((short [])o));
    } else if (o instanceof boolean[]) { print(Arrays.toString((boolean [])o));
    } else if (o instanceof float[]) { print(Arrays.toString((float [])o));
    } else if (o instanceof double[]) { print(Arrays.toString((double [])o));
    } else if (o instanceof Object[]) { print(Arrays.toString((Object [])o));
    } else { print("" + o); }
  }
  void print(String s) { pw.print(s); }
  void println() { println(""); }
  void println(byte b) { println("" + b); }
  void println(int i) { println("" + i); }
  void println(long l) { println("" + l); }
  void println(double d) { println("" + d); }
  void println(char c) { println("" + c); }
  void println(Object o) { print(o); println(); }
  void println(String s) { pw.println(s); }
  int nextInt() throws IOException { return Integer.parseInt(nextToken()); }
  long nextLong() throws IOException { return Long.parseLong(nextToken()); }
  double nextDouble() throws IOException { return Double.parseDouble(nextToken()); }
  char nextChar() throws IOException { return (char) (br.read()); }
  String next() throws IOException { return nextToken(); }
  String nextLine() throws IOException { return br.readLine(); }
  int [] readInt(int size) throws IOException {
    int [] array = new int [size];
    for (int i = 0; i < size; i++) { array[i] = nextInt(); }
    return array;
  }
  long [] readLong(int size) throws IOException {
    long [] array = new long [size];
    for (int i = 0; i < size; i++) { array[i] = nextLong(); }
    return array;
  }
  double [] readDouble(int size) throws IOException {
    double [] array = new double [size];
    for (int i = 0; i < size; i++) { array[i] = nextDouble(); }
    return array;
  }
  String [] readLines(int size) throws IOException {
    String [] array = new String [size];
    for (int i = 0; i < size; i++) { array[i] = nextLine(); }
    return array;
  }
}