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 long long mod1 = 1e9 + 7;
const long long mod2 = 1e9 + 9;
long long mod3 = 51648451845484111;
long long mod4 = 15645615615614547;
long long mod5 = 642690137449562111;
long long mod6 = 5843009213693951;
const long long mod7 = 1e9 + 9;
const long long mod8 = 1e9 + 7;
const long long maxn = 1e9 + 7;
const long long maxe = 1e9 + 7;
const long long INF = 1257787;
const long long INF1 = 1398269;
const long long INF2 = 20996011;
const long long INF3 = 13466917;
const long long INF4 = 24036583;
const long long INF5 = 25964951;
const double PI = acos(-1);
int dx[4] = {0, 0, 1, -1};
int dy[4] = {-1, 1, 0, 0};
map<string, int> ms;
map<string, int> mm;
map<int, int> mg[100005];
struct node {
  long long m1, m2, m3, m4, m5, m6, m7, m8;
  int nu;
  node() { m1 = m2 = m3 = m4 = m5 = m6 = m7 = m8 = 0; }
  bool operator<(const node& other) const { return m1 < other.m1; }
};
vector<node> vn;
int fa[100000 + 10];
void init() {
  for (int i = 0; i < 100005; i++) fa[i] = i;
}
int find(int x) {
  if (x == fa[x])
    return x;
  else
    return fa[x] = find(fa[x]);
}
void unite(int x, int y) {
  x = find(x);
  y = find(y);
  fa[y] = x;
}
bool is(int x, int y) { return find(x) == find(y); }
bool iss(node a, node b) {
  return a.m1 == b.m1 && a.m2 == b.m2 && a.m3 == b.m3 && a.m4 == b.m4 &&
         a.m5 == b.m5 && a.m6 == b.m6 && a.m7 == b.m7 && a.m8 == b.m8;
}
vector<int> ans[100005];
vector<int> an;
struct nnn {
  string s;
  string ss;
  string sss;
  bool operator<(const nnn& other) const {
    if (ss != other.ss)
      return ss < other.ss;
    else
      return sss < other.sss;
  }
};
vector<nnn> vnn;
vector<int> vv[100005];
vector<string> s1;
vector<string> s2;
vector<long long> vl;
map<int, int> mii;
const long long zz = 2040191;
int main() {
  int num;
  cin >> num;
  int cou = 0;
  int co = 0;
  for (int i = 0; i < num; i++) {
    nnn s;
    cin >> s.s;
    int now = ((int)(s.s).size());
    for (int i = 7; i <= ((int)(s.s).size()) - 1; i++)
      if (s.s[i] == '/') {
        now = i;
        break;
      }
    s.ss = s.s.substr(7, now - 7);
    s.sss = s.s.substr(now, ((int)(s.s).size()) - now);
    vnn.push_back(s);
  }
  sort((vnn).begin(), (vnn).end());
  vl.push_back(zz);
  for (int i = 0; i < num; i++) {
    vl.push_back(vl[i] * zz % mod6);
  }
  for (int i = 0; i < num; i++) {
    string s;
    s = vnn[i].s;
    int len = 0;
    for (int j = 7; j <= ((int)(s).size()) - 1; j++) {
      if (s[j] == '/') {
        len = j;
        break;
      }
    }
    if (len == 0) len = ((int)(s).size());
    string ss = s.substr(0, len);
    if (ms[ss] == 0) {
      ms[ss] = ++cou;
      node nn;
      nn.nu = cou;
      vn.push_back(nn);
      s1.push_back(ss);
    }
    int now = ms[ss];
    string h = s.substr(len, ((int)(s).size()) - len);
    if (mm[h] == 0) {
      s2.push_back(h);
      mm[h] = ++co;
    }
    int no = mm[h];
    if (mg[now][no] == 0) {
      vn[now - 1].m1 = (vn[now - 1].m1 * vl[mii[now]] + no) % mod1;
      vn[now - 1].m2 = (vn[now - 1].m2 * INF + no) % mod2;
      vn[now - 1].m3 = (vn[now - 1].m3 * INF1 + no) % mod3;
      vn[now - 1].m4 = (vn[now - 1].m4 * INF2 + no) % mod4;
      vn[now - 1].m5 = (vn[now - 1].m5 * vl[mii[now]] + no) % mod5;
      vn[now - 1].m6 = (vn[now - 1].m6 * INF3 + no) % mod6;
      vn[now - 1].m7 = (vn[now - 1].m7 * INF4 + no) % mod7;
      vn[now - 1].m8 = (vn[now - 1].m8 * vl[mii[now]] + no) % mod8;
      mii[now]++;
      mg[now][no] = 1;
    }
  }
  init();
  sort((vn).begin(), (vn).end());
  for (int i = 0; i < ((int)(vn).size()) - 1; i++) {
    if (iss(vn[i], vn[i + 1])) {
      unite(vn[i].nu, vn[i + 1].nu);
    }
  }
  for (int i = 0; i < 100005; i++) {
    ans[find(i)].push_back(i);
  }
  for (int i = 0; i < 100005; i++) {
    if (((int)(ans[i]).size()) > 1) an.push_back(i);
  }
  cout << ((int)(an).size()) << endl;
  for (int i = 0; i < ((int)(an).size()); i++) {
    for (int j = 0; j < ((int)(ans[an[i]]).size()); j++) {
      cout << s1[ans[an[i]][j] - 1] << " ";
    }
    cout << endl;
  }
  return 0;
}