#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;
}
