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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-8;
const int INF = 1E9;
const int MAXN = 100500;
const long long MOD[3] = {999989981, 999989957, 999979957};
const long long PW[3] = {1000010029, 1002010033, 1000510037};
struct piii {
  int x, y, z;
  piii(int _X = 0, int _Y = 0, int _Z = 0) {
    x = _X;
    y = _Y;
    z = _Z;
  }
};
bool operator==(piii a, piii b) {
  return a.x == b.x && a.y == b.y && a.z == b.z;
}
bool operator!=(piii a, piii b) { return !(a == b); }
bool operator<(piii a, piii b) {
  if (a.x != b.x) return a.x < b.x;
  if (a.y != b.y) return a.y < b.y;
  return a.z < b.z;
}
int n, m, sz;
string s, res[2];
long long tmp[3];
pair<piii, piii> hashes[MAXN];
pair<piii, piii> blocks[MAXN];
map<piii, string> strings, paths;
vector<piii> ans[MAXN];
piii getHash(string &s) {
  long long res[3];
  for (int i = 0; i < (int)(3); i++) {
    res[i] = 0;
    for (int j = 0; j < (int)(s.size()); j++)
      res[i] = (res[i] * PW[i] + s[j]) % MOD[i];
  }
  return piii(res[0], res[1], res[2]);
}
int main() {
  cin >> n;
  for (int i = 0; i < (int)(n); i++) {
    cin >> s;
    res[0] = "";
    res[1] = "/";
    int id = 0;
    for (int j = 0; j < (int)s.size(); j++) {
      if (id == 0 && j >= 7 && s[j] == '/') {
        id++;
      }
      res[id] += s[j];
    }
    piii p1 = getHash(res[0]);
    piii p2 = getHash(res[1]);
    strings[p1] = res[0];
    paths[p2] = res[1];
    hashes[i] = {p1, p2};
  }
  sort(hashes, hashes + n);
  n = unique(hashes, hashes + n) - hashes;
  int L = 0;
  m = 0;
  for (int i = 1; i <= n; i++)
    if (hashes[L].first != hashes[i].first || i == n) {
      tmp[0] = tmp[1] = tmp[2] = 0;
      s = "";
      for (int j = L; j < i; j++) s += paths[hashes[j].second] + '!';
      blocks[m] = {getHash(s), hashes[L].first};
      m++;
      L = i;
    }
  sort(blocks, blocks + m);
  L = 0;
  sz = 0;
  for (int i = 1; i <= m; i++)
    if (blocks[L].first != blocks[i].first || i == m) {
      if (L + 1 < i) {
        for (int j = L; j < i; j++) {
          ans[sz].push_back(blocks[j].second);
        }
        sz++;
      }
      L = i;
    }
  cout << sz << '\n';
  for (int i = 0; i < (int)(sz); i++) {
    for (int j = 0; j < (int)(ans[i].size()); j++)
      cout << strings[ans[i][j]] << " \n"[j == (int)ans[i].size() - 1];
  }
  return 0;
}