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;
template <typename T>
inline string to_str(const T& v) {
  ostringstream os;
  os << v;
  return os.str();
}
template <typename T>
inline T to_obj(const string& v) {
  istringstream is(v);
  T r;
  is >> r;
  return r;
}
template <class T>
inline int cMin(T& a, T b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
inline int cMax(T& a, T b) {
  return a < b ? a = b, 1 : 0;
}
char TEMPLATE[32];
int64_t INDEX[128];
char buf[128];
inline int64_t convert0(const char* s, int n) {
  int64_t v = 0;
  int k = 0;
  for (int i = 0; i < (n); ++i) {
    v |= (INDEX[s[i]] << k);
    k += 5;
  }
  v = (v << 4) | n;
  return v;
}
inline pair<int64_t, int64_t> convert1(const char* s, int n) {
  int m = n >> 1;
  return pair<int64_t, int64_t>(convert0(s, m), convert0(s + m, n - m));
}
inline void print(int64_t v) {
  int n = (v & 0xf);
  v >>= 4;
  for (int i = 0; i < (n); ++i) {
    printf("%c", TEMPLATE[(v & 0x1f)]);
    v >>= 5;
  }
}
inline void print(pair<int64_t, int64_t> v) {
  print(v.first);
  print(v.second);
}
inline pair<pair<int64_t, int64_t>, pair<int64_t, int64_t> > do_read() {
  scanf("%s", buf);
  int hs = 7;
  int hn = 0;
  while (buf[hs + hn] != '/' && buf[hs + hn]) ++hn;
  pair<int64_t, int64_t> h = convert1(buf + hs, hn);
  int ps = hs + hn;
  int pn = strlen(buf) - ps;
  pair<int64_t, int64_t> p = convert1(buf + ps, pn);
  return make_pair(h, p);
}
inline uint64_t do_hash(const std::vector<pair<int64_t, int64_t> >& A,
                        uint64_t P, uint64_t Q) {
  uint64_t R = 0;
  uint64_t B = 1;
  for (size_t i = 0; i < A.size(); ++i) {
    R += A[i].first * B + Q;
    B *= P;
    R += A[i].second * B + Q;
    B *= P;
  }
  return R;
}
int main(int argc, char* argv[]) {
  for (int i = 0; i < (32); ++i) TEMPLATE[i] = 0;
  int nn = 0;
  for (int i = 'a'; i <= 'z'; ++i) {
    TEMPLATE[nn++] = i;
  }
  TEMPLATE[nn++] = '.';
  TEMPLATE[nn++] = '/';
  for (int i = 0; i < (nn); ++i) INDEX[TEMPLATE[i]] = i;
  int N;
  scanf("%d", &N);
  map<pair<int64_t, int64_t>, vector<pair<int64_t, int64_t> > > Hash;
  for (int i = 0; i < (N); ++i) {
    pair<pair<int64_t, int64_t>, pair<int64_t, int64_t> > A = do_read();
    Hash[A.first].push_back(A.second);
  }
  map<pair<int64_t, int64_t>, vector<pair<int64_t, int64_t> > >::iterator it =
      Hash.begin();
  map<pair<uint64_t, pair<uint64_t, uint64_t> >,
      vector<pair<int64_t, int64_t> > >
      G;
  for (; it != Hash.end(); ++it) {
    vector<pair<int64_t, int64_t> >& A = it->second;
    std::sort(it->second.begin(), it->second.end());
    A.erase(std::unique(A.begin(), A.end()), A.end());
    G[pair<uint64_t, pair<uint64_t, uint64_t> >(
          make_pair(do_hash(A, 31, 19),
                    make_pair(do_hash(A, 37, 17), do_hash(A, 29, 47))))]
        .push_back(it->first);
  }
  {
    map<pair<uint64_t, pair<uint64_t, uint64_t> >,
        vector<pair<int64_t, int64_t> > >::iterator it = G.begin();
    vector<vector<pair<int64_t, int64_t> > > ans;
    for (; it != G.end(); ++it) {
      if (it->second.size() > 1) {
        ans.push_back(it->second);
      }
    }
    printf("%d\n", (int)ans.size());
    for (size_t i = 0; i < ans.size(); ++i) {
      for (size_t j = 0; j < ans[i].size(); ++j) {
        if (j) printf(" ");
        printf("http://");
        print(ans[i][j]);
      }
      printf("\n");
    }
  }
  return 0;
}