#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000;
string names[MAXN];
map<string, int> sites;
set<string> requests[MAXN];
int nSites;
int queries;
map<set<string>, vector<int> > p2h;
int findIndex(string s) {
  if (sites.find(s) == sites.end()) {
    sites[s] = nSites;
    names[nSites] = s;
    nSites++;
    return nSites - 1;
  } else {
    return sites[s];
  }
}
int main() {
  cin >> queries;
  cin.ignore();
  string s;
  while (queries--) {
    getline(cin, s);
    s = s.substr(7);
    stringstream ss(s);
    string site, req;
    getline(ss, site, '/');
    if (!ss.fail()) {
      getline(ss, req);
    }
    if (req.empty() && s.back() == '/') req.push_back('/');
    int ind = findIndex(site);
    requests[ind].insert(req);
  }
  for (int i = 0; i < nSites; i++) {
    if (p2h.find(requests[i]) == p2h.end()) {
      p2h[requests[i]] = vector<int>();
    }
    p2h[requests[i]].push_back(i);
  }
  int nGroups = 0;
  for (map<set<string>, vector<int> >::iterator it = p2h.begin();
       it != p2h.end(); it++) {
    if (it->second.size() >= 2) {
      nGroups++;
    }
  }
  cout << nGroups << endl;
  for (map<set<string>, vector<int> >::iterator it = p2h.begin();
       it != p2h.end(); it++) {
    if (it->second.size() >= 2) {
      for (int i = 0; i < it->second.size(); i++) {
        cout << "http://" << names[it->second[i]];
        if (i + 1 == it->second.size())
          cout << endl;
        else
          cout << ' ';
      }
    }
  }
}
