#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const int N = 1e5 + 5;
int n;
map<string, set<string> > m;
map<string, set<string> > m2;
set<string> host;
vector<set<string> > res;
int main(void) {
  ios_base::sync_with_stdio(false);
  cin >> n;
  while (n--) {
    string s;
    cin >> s;
    host.insert(s);
    string s1 = "", s2 = "";
    int count = 0;
    for (int i = 0; i < (int)s.size(); i++) {
      if (s[i] == '/') count++;
      if (count < 3) {
        s1 += s[i];
      } else {
        s2 += s[i];
      }
    }
    s1 += " ";
    s2 += " ";
    m[s1].insert(s2);
  }
  for (map<string, set<string> >::iterator it = m.begin(); it != m.end();
       it++) {
    string str = "";
    for (set<string>::iterator itt = (it->second).begin();
         itt != (it->second).end(); itt++) {
      str += (*itt);
    }
    m2[str].insert(it->first);
  }
  for (map<string, set<string> >::iterator it = m2.begin(); it != m2.end();
       it++) {
    if ((it->second).size() > 1) {
      res.push_back(it->second);
    }
  }
  cout << res.size() << endl;
  for (int i = 0; i < (int)res.size(); i++) {
    for (set<string>::iterator it = res[i].begin(); it != res[i].end(); it++) {
      cout << (*it) << " ";
    }
    cout << endl;
  }
  return 0;
}
