#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M = 0;
  cin >> N;
  map<string, set<string> > a;
  map<set<string>, set<string> > b;
  for (int i = 0; i < N; i++) {
    string url;
    cin >> url;
    int s = find(url.begin() + 7, url.end(), '/') - url.begin();
    a[url.substr(0, s)].insert(url.substr(s, url.length() - s));
  }
  for (map<string, set<string> >::iterator i = a.begin(); i != a.end(); i++)
    b[i->second].insert(i->first);
  for (map<set<string>, set<string> >::iterator i = b.begin(); i != b.end();
       i++)
    if ((i->second).size() != 1) M++;
  cout << M << endl;
  for (map<set<string>, set<string> >::iterator i = b.begin(); i != b.end();
       i++) {
    if ((i->second).size() != 1) {
      copy((i->second).begin(), (i->second).end(),
           ostream_iterator<string>(cout, " "));
      cout << endl;
    }
  }
  return 0;
}
