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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.security.interfaces.DSAKey;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

public class a {

	public static class in {
		static BufferedReader reader;
		static StringTokenizer tokenizer;

		static void init(InputStream input) {
			reader = new BufferedReader(new InputStreamReader(input));
			tokenizer = new StringTokenizer("");
		}

		static String next() throws IOException {
			while (!tokenizer.hasMoreTokens())
				tokenizer = new StringTokenizer(reader.readLine());
			return tokenizer.nextToken();
		}

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

		static double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

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

	public static long comp(int n, int r) {
		r = Math.min(r, n - r);
		long ans = 1;
		for (int i = 1; i <= r; i++) {
			ans = ans * (long) (n - r + i) / (long) i;
		}
		return ans;

	}

	public static class node {

		long t;
		long d;
		int idx;

		node(long t, long d, int idx) {
			this.t = t;
			this.d = d;
			this.idx = idx;

		}

	}

	public static long gcd(int x, int y) {
		if (y == 0)
			return x;
		return gcd(y, x % y);
	}

	public static int z[];

	public static void Z_algorithm(char[] a, ArrayList<Long> arr) {
		z = new int[a.length];
		z[0] = a.length;
		int l = 0, r = 0;
		for (int i = 1; i < a.length; i++) {

			if (i > r) {
				l = r = i;

				while (r < a.length && a[r - l] == a[r]
						&& (long) arr.get(r - l) == (long) arr.get(r)) {

					r++;
				}

				z[i] = r - l;
				r--;
			} else {
				int k = i - l;
				if (z[k] < r - i + 1)
					z[i] = z[k];
				else {
					l = i;
					while (r < a.length && a[r - l] == a[r]
							&& (long) arr.get(r - l) == (long) arr.get(r))
						r++;
					z[i] = r - l;
					r--;
				}
			}

		}
	}

	public static long tree[];
	public static int n;

	public static void add(int idx, long val) {

		while (idx <= n) {
			tree[idx] += val;
			idx += (idx & -idx);
		}
	}

	public static long get(int idx) {
		long g = 0;
		while (idx > 0) {
			g += tree[idx];
			idx -= (idx & -idx);
		}
		return g;
	}

	public static void main(String[] args) throws IOException {
		StringBuilder qq = new StringBuilder();
		in.init(System.in);
		PrintWriter out = new PrintWriter(System.out);
		// source code
		// String hostNamee = "http://";
		// System.out.println(hostNamee.length());
		int n = in.nextInt();
		HashSet<Integer> set[] = new HashSet[n];
		HashMap<String, Integer> host = new HashMap();
		HashMap<Integer, String> hostinverse = new HashMap();
		HashMap<String, Integer> path = new HashMap();
		ArrayList<Integer> ans[] = new ArrayList[n];
		int p1 = 0;
		int p2 = 0;
		for (int i = 0; i < n; i++) {
			ans[i] = new ArrayList();
			set[i] = new HashSet();
			String a = in.next();
			String hostName = "http://";
			String path1 = "";
			boolean ok = true;
			for (int j = 7; j < a.length(); j++) {
				if (a.charAt(j) == '/')
					ok = false;
				if (ok)
					hostName += a.charAt(j);
				else
					path1 += a.charAt(j);
			}
			int key1;
			int key2;
			if (host.containsKey(hostName)) {
				key1 = host.get(hostName);
			} else {
				host.put(hostName, p1);
				hostinverse.put(p1, hostName);
				key1 = p1;
				p1++;
			}

			if (path.containsKey(path1)) {
				key2 = path.get(path1);
			} else {
				path.put(path1, p2);
				key2 = p2;
				p2++;
			}

			set[key1].add(key2);
		}
		HashMap<HashSet<Integer>, Integer> union = new HashMap();
		int p3 = 0;
		for (int i = 0; i < p1; i++) {
			if (union.containsKey(set[i])) {
				int key = union.get(set[i]);
				ans[key].add(i);
			} else {
				union.put(set[i], p3);
				ans[p3].add(i);
				p3++;
			}
		}
		int count = 0;
		for (int i = 0; i < p3; i++) {
			if (ans[i].size() > 1) {
				count++;
			}
		}

		out.println(count);
		for (int i = 0; i < p3; i++) {
			if (ans[i].size() > 1) {
				for (int j = 0; j < ans[i].size(); j++) {
					out.print(hostinverse.get(ans[i].get(j)) + " ");
				}
				out.println();
			}
		}

		out.close();

	}
}