#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  map<string, set<string> > M;
  int n;
  cin >> n;
  for (int i = (int)(0); i < (int)(n); ++i) {
    string s;
    cin >> s;
    int p = 7;
    while (p < (int)s.size() && s[p] != '/') ++p;
    M[string(s.begin(), s.begin() + p)].insert(string(s.begin() + p, s.end()));
  }
  map<set<string>, set<string> > M2;
  for (auto bla : M) M2[bla.second].insert(bla.first);
  set<set<string> > S;
  for (auto bla : M2)
    if (bla.second.size() > 1) S.insert(bla.second);
  cout << S.size() << endl;
  for (auto t : S) {
    for (auto tt : t) cout << tt << " ";
    cout << endl;
  }
  return 0;
}
