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.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

public class Problem3 {


	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner ob=new Scanner(System.in);
		
		int num = Integer.parseInt(ob.nextLine());
		
		Map map_hostname = new HashMap();
		Map map_path = new HashMap();
		
		ArrayList<String> hostname_list = new ArrayList<String>();
		
		int cnt = 0;
		String str_res = "";
		
		
		int id_hostname = 0;
		int id_path = 0;
		
		String hostname;
		String path;
		
		String line;
		
		host_path [] hp = new host_path[num];
		
		ArrayList<host_path> hp_list = new ArrayList<host_path>();
		
		ArrayList<  Set<Integer> > l = new  ArrayList<  Set<Integer> >();
		
		

		for (int i = 0; i < num; i++){
			
			line = ob.nextLine();
			
//			line = line.substring(7);
			
//			int x = line.indexOf("/");
			
			int x = line.indexOf("/", 7);
			
			if (x == -1){
				hostname = line;
				path = "-";
			} else {
				hostname = line.substring(0, x);
				path = line.substring(x + 1);
			}
			
			if (path.equals(""))
				path = "_";
			
			int key_hostname, key_path;
			
//			if (map_hostname.containsKey(hostname)){
//				key_hostname = (int) map_hostname.get(hostname);
//			} else {
//				key_hostname = id_hostname;
//				map_hostname.put(hostname, id_hostname ++);
//				hostname_list.add(hostname);
//			}
			
			if (map_path.containsKey(path)){
				key_path = (int)map_path.get(path);
			} else {
				key_path = id_path;
				map_path.put(path, id_path ++);
			}
			
//			hp[i] = new host_path(key_hostname, key_path);
//			hp_set.add(new host_path(key_hostname, key_path) );
//			hp_list.add( new host_path(key_hostname, key_path) );
			
			
			if (map_hostname.containsKey(hostname)){
				key_hostname = (int) map_hostname.get(hostname);
				l.get(key_hostname).add(key_path);
			} else {
				map_hostname.put(hostname, id_hostname ++);
				hostname_list.add(hostname);
				Set<Integer> temp_s = new HashSet<Integer>();
				temp_s.add(key_path);
				l.add(temp_s);
			}
			
			
			
		}
		
		BitSet bs = new BitSet(id_path);
		
//		Set<host_path> hp_set = new HashSet<host_path>(hp_list);
		
//		host_path [] hp = new host_path[hp_set.size()];
		
//		hp = (host_path[]) hp_set.toArray(hp);
		
//		Arrays.sort(hp);
		
//		for (int i = 0; i < num; i++){
//			System.out.println(i + ": " + hostname_list.get(hp[i].hostname)  +  " =>  " + hp[i].hostname  + " : " + hp[i].path);
//		}
		
		ArrayList<host_path_sort> list = new ArrayList<host_path_sort>();
		
		HashMap<String, ArrayList<Integer>> list_res = new HashMap<String, ArrayList<Integer>>();
		
		String local_res = "";
		for (int i = 0; i < hostname_list.size(); i++){
//			local_res = "";
			bs = new BitSet(id_path);
			for (int x : l.get(i)){
//				local_res +=  x;
				bs.set(x);
			}
			
//			list.add(new host_path_sort(i, bs.toString().hashCode()));
			
			if (list_res.containsKey(bs.toString())){
				list_res.get(bs.toString()).add(i);
				if (list_res.get(bs.toString()).size() == 2)
					cnt ++;
			} else {
				ArrayList<Integer> li = new ArrayList<Integer>();
				li.add(i);
				list_res.put(bs.toString(), li);
			}
			
		}
		
		System.out.println(cnt);
		
		
		for (String s : list_res.keySet()){
			
			ArrayList<Integer> al = list_res.get(s);
			
			if (al.size() < 2)
				continue;
			
			for (int x : al){
				System.out.print( hostname_list.get(x) + " " );
			}
			
			System.out.println();
		}
		
		
		
		
		
//		int last_host;
//		String local_res = "";
//		
//		for (int i = 0; i < num; i++){
//			
//			if(i == 0){
//				local_res = hp[i].path + " ";
//				continue;
//			}
//			
//			if (hp[i].hostname == hp[i - 1].hostname && hp[i].path == hp[i - 1].path)
//				continue;
//			
//			if (hp[i].hostname == hp[i - 1].hostname){
//				local_res += hp[i].path + " ";
//				if (i == num - 1)
//					list.add(new host_path_sort(hp[i].hostname, local_res.hashCode()));
//			} else {
//				list.add(new host_path_sort(hp[i - 1].hostname, local_res.hashCode()));
//				
//				local_res = hp[i].path + " ";
//				if (i == num - 1)
//					list.add(new host_path_sort(hp[i].hostname, local_res.hashCode()));
//			}
//		}
		
//		Collections.sort(list);
		
//		for (int i = 0; i < list.size(); i++){
//			System.out.println(list.get(i).hostname  + " : " + list.get(i).path);
//		}
//		
//		for (int i = 0; i < hostname_list.size(); i++){
//			System.out.println(hostname_list.get(i));
//		}
		
//		String local_str = "";
//		
//		int last_pos = 0;
//		int last_value = list.get(0).path;
//		ArrayList<String> list_res = new ArrayList<String>();
//
//		for (int i = 0; i < list.size(); i++){
//			
//			if (list.get(i).path == last_value){
//				if (i == list.size() - 1){
////					System.out.println(i + "equal and last");
//					if (i - last_pos > 0){
//					cnt ++;
//					local_str = "";
//					for (int j = last_pos; j <= i; j++){
//						local_str +=   hostname_list.get( list.get(j).hostname ) + " ";
//					}
////					str_res += local_str + "\n";
//					list_res.add(local_str);
//					}
//				}
//			} else {
////				System.out.println("inequal at " + i);
//				if (i - last_pos > 1){
//					cnt ++;
//					local_str = "";
//					for (int j = last_pos; j < i; j++){
//						local_str +=   hostname_list.get( list.get(j).hostname ) + " ";
//					}
////					str_res += local_str + "\n";
//					list_res.add(local_str);
//				}
//				last_value = list.get(i).path;
//				last_pos = i;
//				
//			}
//			
//		}
//		
//		System.out.println(cnt);
//		
////		System.out.println ( str_res );
//		for (String s : list_res)
//			System.out.println(s);

		
	}
	
}

class host_path implements Comparable<host_path> {
    int hostname;
    int path;

    
    public host_path(int hostname, int path) {
        super();
        this.hostname = hostname;
        this.path = path;
    }
    
    @Override
    public int compareTo(host_path hp) {
    	if (hostname != hp.hostname)
    		return Integer.compare(hostname, hp.hostname);
    	else
    	   return Integer.compare(path, hp.path);
    }
    
    public boolean equals(host_path hp){
    	if (hostname == hp.hostname && path == hp.path)
    		return true;
    	else
    		return false;
    }
}

class host_path_sort implements Comparable<host_path_sort> {
    int hostname;
    int path;

    
    public host_path_sort(int hostname, int path) {
        super();
        this.hostname = hostname;
        this.path = path;
    }
    
    @Override
    public int compareTo(host_path_sort hp) {
    	return Integer.compare(path, hp.path);
    }
}