#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-11;
const long long MOD = 1000000007;
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
void setbit(T& v, int position) {
  v |= (T)1 << position;
}
template <class T>
void unsetbit(T& v, int position) {
  v &= ~((T)1 << position);
}
template <class T>
void togglebit(T& v, int position) {
  v ^= (T)1 << position;
}
template <class T>
bool isbit(T v, int position) {
  return (v & ((T)1 << position)) != 0;
}
template <class T>
inline int countbit(T n) {
  return (n == 0) ? 0 : (1 + countbit(n & (n - 1)));
}
string ReadToEndLine(istream& s) {
  string sLine;
  getline(s, sLine);
  return sLine;
}
char gStr[1024];
struct Runner {
  Runner(istream& in, ostream& out) : mIn(in), mOut(out) {}
  void Run();
  istream& mIn;
  ostream& mOut;
};
void Runner::Run() {
  int N;
  mIn >> N;
  map<string, set<string> > S;
  for (int n = (0); n < (N); n++) {
    string line, server, path;
    mIn >> line;
    size_t slash = line.find('/', 7);
    if (slash == string::npos) {
      server = line;
    } else {
      server = line.substr(0, slash);
      path = line.substr(slash);
    }
    S[server].insert(path);
  }
  map<long long, set<string> > H;
  for (auto itS : S) {
    const int p = 131;
    long long hash = 0, p_pow = 1;
    for (auto itP : itS.second) {
      const string s = itP;
      for (size_t i = 0; i < s.length(); ++i) {
        hash += (s[i]) * p_pow;
        p_pow *= p;
      }
      hash += ('#') * p_pow;
    }
    H[hash].insert(itS.first);
  }
  map<long long, set<string> > R;
  for (auto itH : H) {
    if (itH.second.size() > 1) R[itH.first] = itH.second;
  }
  mOut << R.size() << endl;
  for (auto itR : R) {
    for (auto itN : itR.second) {
      mOut << itN << " ";
    }
    mOut << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  Runner runner(cin, cout);
  runner.Run();
  return 0;
}
