#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    map<string, vector<string> > m;
    string s;
    while (n--) {
      cin >> s;
      int ind = s.find('/', 7);
      if (ind == -1)
        m[s].push_back("");
      else
        m[s.substr(0, ind)].push_back(s.substr(ind));
    }
    map<vector<string>, vector<string> > res;
    for (map<string, vector<string> >::iterator it = m.begin(); it != m.end();
         it++) {
      sort(it->second.begin(), it->second.end());
      it->second.erase(unique(it->second.begin(), it->second.end()),
                       it->second.end());
      res[it->second].push_back(it->first);
    }
    int r = 0;
    for (map<vector<string>, vector<string> >::iterator it = res.begin();
         it != res.end(); it++) {
      if (it->second.size() != 1) r++;
    }
    cout << r << endl;
    for (map<vector<string>, vector<string> >::iterator it = res.begin();
         it != res.end(); it++) {
      if (it->second.size() != 1) {
        for (int i = 0; i < it->second.size(); i++)
          cout << it->second[i] << ' ';
        cout << endl;
      }
    }
  }
  return 0;
}
