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.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

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(in, out);

		out.close();
	}

}

class TaskC {

	public void solve(InputReader in, OutputWriter out) {
		
		int n = in.nextInt();
		TreeMap<String, TreeSet<Pair>> hosts = new TreeMap<String, TreeSet<Pair>>();
		for(int i = 0; i < n; i++) {
			String s = in.nextLine().substring(7);
			String host = s.substring(0, s.indexOf('/') == -1 ? s.length() : s.indexOf('/'));
			String path = s.indexOf('/') == -1 ? "" : s.substring(s.indexOf('/'));
			
			if(hosts.containsKey(host)) {
				hosts.get(host).add(getHash(path));
			}else {
				hosts.put(host, new TreeSet<Pair>());
				hosts.get(host).add(getHash(path));
			}
		}
		
		TreeMap<String, ArrayList<String>> groups = new TreeMap<String, ArrayList<String>>();
		for(String host : hosts.keySet()) {
			StringBuilder str = new StringBuilder("");
			for(Pair p : hosts.get(host)) {
				str.append("("+p.hash1+";"+p.hash2+")");
			}
			
			String s = str.toString();
			
			if(groups.containsKey(s)) {
				groups.get(s).add(host);
			}else {
				groups.put(s, new ArrayList<String>());
				groups.get(s).add(host);
			}
		}
		
		
		ArrayList<Integer> cntAns = new ArrayList<Integer>();
		ArrayList<String> ans = new ArrayList<String>();
		int cnt = 0;
		
		for(String group : groups.keySet()) {
			if(groups.get(group).size() > 1) {
				cnt++;
				int cntA = 0;
				for(String host : groups.get(group)) {
					ans.add(host);
					cntA++;
				}
				cntAns.add(cntA);
			}
		}
		
		out.writeln(cnt);
		for(int k=0, i = 0; i < ans.size(); k++) {
			int j;
			for(j = i; j < i + cntAns.get(k); j++) {
				out.write("http://"+ans.get(j)+ " ");
			}
			out.writeln();
			i = j;
		}
	}
	
	Pair getHash(String s) {
		hash1 = hash2 = 0;
		p1 = p2 = 1;
		for(int i = 0; i < s.length(); i++) {
			hash1 = (hash1 + s.charAt(i) * p1) % MOD1;
			p1 = (p1 * pow1 ) % MOD1;
			
			hash2 = (hash2 + s.charAt(i) * p2) % MOD2;
			p2 = (p2 * pow2) % MOD2;
		}
		
		return new Pair(hash1, hash2);
	}
	
	long hash1 = 0, hash2 = 0;
	long p1 = 1, p2 = 1;
	long pow1 = 17, pow2 = 29;
	long MOD1 = 1000000007, MOD2 = 1000000009;
	
}

class Pair implements Comparable<Pair>{
	
	public Pair(long hash1, long hash2) {
		this.hash1 = hash1;
		this.hash2 = hash2;
	}
	
	public int compareTo(Pair p){
		return hash1 == p.hash1 ? (int)(hash2 - p.hash2) : (int)(hash1 - p.hash1);
	}
	
	long hash1, hash2;
}

class InputReader {

	public InputReader(InputStream inputStream) {
		tokenizer = null;
		reader = new BufferedReader(new InputStreamReader(inputStream));
	}

	public String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}

		return tokenizer.nextToken();
	}

	public String nextLine() {
		try {
			return reader.readLine();
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

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

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

	StringTokenizer tokenizer;
	BufferedReader reader;
}

class OutputWriter {

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

	public void write(Object... o) {
		for (Object x : o)
			out.print(x);
	}

	public void writeln(Object... o) {
		write(o);
		out.println();
	}

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

	PrintWriter out;
}